@- Fixed a possible crash in the PHP CGI when no input file is

@  specified (Zeev)
Fixed bug 7822
This commit is contained in:
Zeev Suraski 2001-05-10 14:13:18 +00:00
parent 45a2e761e7
commit 4afa93f716

View File

@ -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();