]> granicus.if.org Git - php/commitdiff
MF PHP5_3 (fixed #43840)
authorRui Hirokawa <hirokawa@php.net>
Sun, 17 Feb 2008 01:59:03 +0000 (01:59 +0000)
committerRui Hirokawa <hirokawa@php.net>
Sun, 17 Feb 2008 01:59:03 +0000 (01:59 +0000)
ext/mbstring/mbstring.c

index 4c0293c1ddcab3428d2fcd230fc32c41da94bdd5..7550fa691d921aa13ea29d910a6c1f28244eb5d1 100644 (file)
@@ -1613,7 +1613,7 @@ PHP_FUNCTION(mb_strpos)
                }
        }
 
-       if (offset < 0 || (unsigned long)offset > haystack.len) {
+       if (offset < 0 || (unsigned long)offset > (unsigned long)mbfl_strlen(&haystack)) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset not contained in string.");
                RETURN_FALSE;
        }