]> granicus.if.org Git - php/commitdiff
MFB length check fix (Mattias Bengtsson)
authorStanislav Malyshev <stas@php.net>
Thu, 20 Sep 2007 21:57:11 +0000 (21:57 +0000)
committerStanislav Malyshev <stas@php.net>
Thu, 20 Sep 2007 21:57:11 +0000 (21:57 +0000)
ext/iconv/iconv.c

index 57af813dce44a0a189a3787aea0152a6b1ba4658..2386bdebbabf6138e98378806d877e40fbc22dd0 100644 (file)
@@ -765,7 +765,7 @@ static php_iconv_err_t _php_iconv_substr(smart_str *pretval,
                }
        }
 
-       if (offset >= total_len) {
+       if (offset >= total_len || len > total_len) {
                return PHP_ICONV_ERR_SUCCESS;
        }