]> granicus.if.org Git - php/commitdiff
fix typo and invalid read
authorAntony Dovgal <tony2001@php.net>
Tue, 8 Aug 2006 08:59:51 +0000 (08:59 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 8 Aug 2006 08:59:51 +0000 (08:59 +0000)
ext/standard/string.c

index 065079763656256f4782ae1596e61b32d302df62..ce3d6604201e9627316c9324095a9703c23ecbd8 100644 (file)
@@ -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);