From: Stanislav Malyshev Date: Thu, 20 Sep 2007 21:57:11 +0000 (+0000) Subject: MFB length check fix (Mattias Bengtsson) X-Git-Tag: RELEASE_2_0_0a1~1779 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d5fce416f86e8e653279dc52630964f91b7f19e;p=php MFB length check fix (Mattias Bengtsson) --- diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 57af813dce..2386bdebba 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -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; }