From 6d5fce416f86e8e653279dc52630964f91b7f19e Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Thu, 20 Sep 2007 21:57:11 +0000 Subject: [PATCH] MFB length check fix (Mattias Bengtsson) --- ext/iconv/iconv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.50.1