felipe Mon, 08 Mar 2010 23:29:46 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=295978
Log: - Fixed bug #51237 (milter SAPI crash on startup) patch by: igmar at palsenberg dot com Bug: http://bugs.php.net/51237 (Open) milter SAPI crash on startup Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/sapi/milter/php_milter.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/sapi/milter/php_milter.c U php/php-src/trunk/sapi/milter/php_milter.c Modified: php/php-src/branches/PHP_5_2/NEWS =================================================================== --- php/php-src/branches/PHP_5_2/NEWS 2010-03-08 22:58:31 UTC (rev 295977) +++ php/php-src/branches/PHP_5_2/NEWS 2010-03-08 23:29:46 UTC (rev 295978) @@ -3,6 +3,7 @@ ?? ??? 2010, PHP 5.2.14 - Updated timezone database to version 2010.3. (Derick) +- Fixed bug #51237 (milter SAPI crash on startup). (igmar at palsenberg dot com) - Fixed bug #51213 (pdo_mssql is trimming value of the money column). (Ilia, alexr at oplot dot com) - Fixed bug #51192 (FILTER_VALIDATE_URL will invalidate a hostname that Modified: php/php-src/branches/PHP_5_2/sapi/milter/php_milter.c =================================================================== --- php/php-src/branches/PHP_5_2/sapi/milter/php_milter.c 2010-03-08 22:58:31 UTC (rev 295977) +++ php/php-src/branches/PHP_5_2/sapi/milter/php_milter.c 2010-03-08 23:29:46 UTC (rev 295978) @@ -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) @@ -127,6 +127,11 @@ /* disable headers */ 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); @@ -189,6 +194,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; Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2010-03-08 22:58:31 UTC (rev 295977) +++ php/php-src/branches/PHP_5_3/NEWS 2010-03-08 23:29:46 UTC (rev 295978) @@ -6,6 +6,7 @@ - Added stream filter support to mcrypt extension (ported from mcrypt_filter). (Stas) +- Fixed bug #51237 (milter SAPI crash on startup). (igmar at palsenberg dot com) - Fixed bug #51213 (pdo_mssql is trimming value of the money column). (Ilia, alexr at oplot dot com) - Fixed bug #51190 (ftp_put() returns false when transfer was successful). Modified: php/php-src/branches/PHP_5_3/sapi/milter/php_milter.c =================================================================== --- php/php-src/branches/PHP_5_3/sapi/milter/php_milter.c 2010-03-08 22:58:31 UTC (rev 295977) +++ php/php-src/branches/PHP_5_3/sapi/milter/php_milter.c 2010-03-08 23:29:46 UTC (rev 295978) @@ -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) @@ -127,6 +127,11 @@ /* disable headers */ 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); @@ -189,6 +194,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; Modified: php/php-src/trunk/sapi/milter/php_milter.c =================================================================== --- php/php-src/trunk/sapi/milter/php_milter.c 2010-03-08 22:58:31 UTC (rev 295977) +++ php/php-src/trunk/sapi/milter/php_milter.c 2010-03-08 23:29:46 UTC (rev 295978) @@ -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) @@ -127,6 +127,11 @@ /* disable headers */ 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); @@ -189,6 +194,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;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
