|
|
|
@ -753,15 +753,15 @@ static php_iconv_err_t _php_iconv_substr(smart_str *pretval, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(len > total_len) { |
|
|
|
if((unsigned int) len > total_len) { |
|
|
|
len = total_len; |
|
|
|
} |
|
|
|
|
|
|
|
if (offset >= total_len) { |
|
|
|
if ((unsigned int) offset >= total_len) { |
|
|
|
return PHP_ICONV_ERR_SUCCESS; |
|
|
|
} |
|
|
|
|
|
|
|
if ((offset + len) > total_len) { |
|
|
|
if ((unsigned int) (offset + len) > total_len) { |
|
|
|
/* trying to compute the length */ |
|
|
|
len = total_len - offset; |
|
|
|
} |
|
|
|
|