From: Zeev Suraski Date: Thu, 10 May 2001 14:13:18 +0000 (+0000) Subject: @- Fixed a possible crash in the PHP CGI when no input file is X-Git-Tag: php-4.0.6RC1~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4afa93f716fe12178e676ba3e01e37647c27f4ad;p=php @- Fixed a possible crash in the PHP CGI when no input file is @ specified (Zeev) Fixed bug 7822 --- 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();