mirror of
https://github.com/php/php-src.git
synced 2026-04-29 19:23:22 +02:00
better fix for iconv_substr
This commit is contained in:
+6
-1
@@ -700,7 +700,12 @@ static php_iconv_err_t _php_iconv_substr(smart_str *pretval,
|
||||
}
|
||||
}
|
||||
|
||||
if (offset >= total_len || len > total_len) {
|
||||
if(len > total_len) {
|
||||
len = total_len;
|
||||
}
|
||||
|
||||
|
||||
if (offset >= total_len) {
|
||||
return PHP_ICONV_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user