From: Derick Rethans Date: Thu, 2 Jun 2005 08:31:03 +0000 (+0000) Subject: - MFH: Fixed memory corruption in stristr(). X-Git-Tag: php-5.0.5RC1~222 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=719b10757616a9fce5535f9a59d8f8b9dfcb3277;p=php - MFH: Fixed memory corruption in stristr(). --- diff --git a/NEWS b/NEWS index 2f2667a638..bb3c2d8ccb 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ PHP NEWS - Fixed ext/mysqli to allocate less memory when fetching bound params of type (MEDIUM|LONG)BLOB/(MEDIUM|LONG)TEXT. (Andrey) - Fixed memory corruption in ImageTTFText() with 64bit systems. (Andrey) +- Fixed memory corruption in stristr(). (Derick) - Fixed bug #33210 (relax jpeg recursive loop protection). (Ilia) - Fixed bug #33200 (preg_replace(): magic_quotes_sybase=On makes 'e' modifier misbehave). (Jani) diff --git a/ext/standard/string.c b/ext/standard/string.c index e44ca6225c..298fbb8378 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1382,8 +1382,8 @@ PHP_FUNCTION(stristr) if (!Z_STRLEN_PP(needle)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter."); efree(haystack_orig); - zval_ptr_dtor(haystack); - zval_ptr_dtor(needle); +// zval_ptr_dtor(haystack); +// zval_ptr_dtor(needle); RETURN_FALSE; } @@ -1409,8 +1409,8 @@ PHP_FUNCTION(stristr) RETVAL_FALSE; } - zval_ptr_dtor(haystack); - zval_ptr_dtor(needle); +// zval_ptr_dtor(haystack); +// zval_ptr_dtor(needle); efree(haystack_orig); } /* }}} */