From: Anatol Belski Date: Tue, 16 Sep 2014 10:53:25 +0000 (+0200) Subject: redo the fix casting to size_t X-Git-Tag: POST_NATIVE_TLS_MERGE^2~255 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=95132bee40321f0cb128702b4154593113cd8273;p=php redo the fix casting to size_t --- diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index ac2374c6a3..490a92618d 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -824,16 +824,16 @@ static php_iconv_err_t _php_iconv_substr(smart_str *pretval, } } - if(len > (zend_long)total_len) { + if((size_t)len > total_len) { len = total_len; } - if (offset >= (zend_long)total_len) { + if ((size_t)offset >= total_len) { return PHP_ICONV_ERR_SUCCESS; } - if ((offset + len) > (zend_long)total_len ) { + if ((size_t)(offset + len) > total_len ) { /* trying to compute the length */ len = total_len - offset; }