svn: /php/php-src/branches/PHP_5_2/ext/standard/ string.c

From: Date: Thu, 01 Jul 2010 18:43:52 +0000
Subject: svn: /php/php-src/branches/PHP_5_2/ext/standard/ string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-63004@lists.php.net to get a copy of this message
felipe Thu, 01 Jul 2010 18:43:52 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=300916 Log: - Fixed a possible memory corruption in strrchr(). (Reported by Péter Veres) Changed paths: U php/php-src/branches/PHP_5_2/ext/standard/string.c Modified: php/php-src/branches/PHP_5_2/ext/standard/string.c =================================================================== --- php/php-src/branches/PHP_5_2/ext/standard/string.c 2010-07-01 15:46:49 UTC (rev 300915) +++ php/php-src/branches/PHP_5_2/ext/standard/string.c 2010-07-01 18:43:52 UTC (rev 300916) @@ -2116,6 +2116,9 @@ FAILURE) { WRONG_PARAM_COUNT; } + if (PZVAL_IS_REF(*haystack)) { + SEPARATE_ZVAL(haystack); + } convert_to_string_ex(haystack); if (Z_TYPE_PP(needle) == IS_STRING) {

« previous php.cvs (#63004) next »