Patch Fix_startup_crash for Reproducible crash Bug #51237
Patch version 2010-03-08 15:52 UTC
Return to Bug #51237 |
Download this patch
Patch Revisions:
Developer: igmar@palsenberg.com
--- php-5.3.2/sapi/milter/php_milter.c.orig 2010-03-08 16:39:36.000000000 +0100
+++ php-5.3.2/sapi/milter/php_milter.c 2010-03-08 16:40:52.000000000 +0100
@@ -92,7 +92,7 @@
extern int ap_php_optind;
static int flag_debug=0;
-static char *filename;
+static char *filename = NULL;
/* per thread */
ZEND_BEGIN_MODULE_GLOBALS(milter)
@@ -128,6 +128,11 @@
SG(headers_sent) = 1;
SG(request_info).no_headers = 1;
+ if (filename == NULL) {
+ php_printf("No input file specified");
+ return SMFIS_TEMPFAIL;
+ }
+
if (!(file_handle.handle.fp = VCWD_FOPEN(filename, "rb"))) {
php_printf("Could not open input file: %s\n", filename);
return SMFIS_TEMPFAIL;
|