From: Antony Dovgal Date: Tue, 8 Aug 2006 08:59:51 +0000 (+0000) Subject: fix typo and invalid read X-Git-Tag: RELEASE_1_0_0RC1~2046 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8320b9a8f0f3c70ae7f514163e6bbf7d86873cc1;p=php fix typo and invalid read --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 0650797636..ce3d660420 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2688,7 +2688,7 @@ PHP_FUNCTION(stripos) u_needle_char[needle_len++] = U16_TRAIL(ch); u_needle_char[needle_len] = 0; } - haystack_dup = php_u_strtolower(haystack_dup, &haystack_len, UG(default_locale)); + haystack_dup = php_u_strtolower(Z_USTRVAL_P(haystack), &haystack_len, UG(default_locale)); found = zend_u_memnstr((UChar *)haystack_dup + offset, (UChar *)u_needle_char, needle_len, (UChar *)haystack_dup + haystack_len);