From 8320b9a8f0f3c70ae7f514163e6bbf7d86873cc1 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 8 Aug 2006 08:59:51 +0000 Subject: [PATCH] fix typo and invalid read --- ext/standard/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.50.1