]> granicus.if.org Git - php/commitdiff
Fix bug #73634 - grapheme_strpos illegal memory access
authorStanislav Malyshev <stas@php.net>
Mon, 16 Jan 2017 09:18:16 +0000 (01:18 -0800)
committerStanislav Malyshev <stas@php.net>
Tue, 20 Jun 2017 20:29:57 +0000 (13:29 -0700)
ext/intl/grapheme/grapheme_string.c

index f69500429d7e0ae2d8aad28bb38337348d9db05a..ad75b3580bd4fa3c4db34bba72a24a87b9b49dc5 100644 (file)
@@ -110,7 +110,8 @@ PHP_FUNCTION(grapheme_strpos)
        size_t haystack_len, needle_len;
        const char *found;
        zend_long loffset = 0;
-       int32_t offset = 0, noffset = 0;
+       int32_t offset = 0;
+       size_t noffset = 0;
        zend_long ret_pos;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len, &loffset) == FAILURE) {