]> granicus.if.org Git - php/commitdiff
- MFH: Fixed memory corruption in stristr().
authorDerick Rethans <derick@php.net>
Thu, 2 Jun 2005 08:31:38 +0000 (08:31 +0000)
committerDerick Rethans <derick@php.net>
Thu, 2 Jun 2005 08:31:38 +0000 (08:31 +0000)
NEWS
ext/standard/string.c

diff --git a/NEWS b/NEWS
index e643084f01c96d169bc8b01c5ca059d5768d1a88..44fd1911a66042beaf76883f4f579c41ce081b04 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ PHP 4                                                                      NEWS
   them sort based on the current locale. (Derick)
 - Changed sha1_file() and md5_file() functions to use streams instead of 
   low level IO. (Uwe)
+- 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)
index 94e1d371cc9f4d6ecd160a9035c5ff9590bf9ab4..3e8fdacd43e051f9824d4c2f7d9bce2175bc82f1 100644 (file)
@@ -1317,8 +1317,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;
                }
 
@@ -1339,8 +1339,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);
 }
 /* }}} */