From 4afa93f716fe12178e676ba3e01e37647c27f4ad Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Thu, 10 May 2001 14:13:18 +0000 Subject: [PATCH] @- Fixed a possible crash in the PHP CGI when no input file is @ specified (Zeev) Fixed bug 7822 --- sapi/cgi/cgi_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index c2cb43b212..dc1cfe9191 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -692,8 +692,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine } if (cgi && !file_handle.handle.fp) { - file_handle.handle.fp = VCWD_FOPEN(argv0, "rb"); - if(!file_handle.handle.fp) { + if(!argv0 || !(file_handle.handle.fp = VCWD_FOPEN(argv0, "rb"))) { PUTS("No input file specified.\n"); php_request_shutdown((void *) 0); php_module_shutdown(); -- 2.50.1