diff options
| author | Rui Hirokawa <hirokawa@php.net> | 2008-02-16 08:58:00 +0000 |
|---|---|---|
| committer | Rui Hirokawa <hirokawa@php.net> | 2008-02-16 08:58:00 +0000 |
| commit | c00121c5a8397c9ce758288434fbf8622e864069 (patch) | |
| tree | 1434391a080e795858dbbf9907c62b1438eaea2e | |
| parent | e67c124e61aeaaef79cf8508e6e5ba8b8f1c3bf4 (diff) | |
| download | php-git-c00121c5a8397c9ce758288434fbf8622e864069.tar.gz | |
fixed bug #43840 mb_strpos bounds check is byte count rather than a character count.
| -rw-r--r-- | ext/mbstring/mbstring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index f630cb884a..9932d73c87 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -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; } |
