]> granicus.if.org Git - php/commitdiff
redo the fix casting to size_t
authorAnatol Belski <ab@php.net>
Tue, 16 Sep 2014 10:53:25 +0000 (12:53 +0200)
committerAnatol Belski <ab@php.net>
Tue, 16 Sep 2014 19:17:21 +0000 (21:17 +0200)
ext/iconv/iconv.c

index ac2374c6a3a48effda56894ca6ac9838379fa310..490a92618d64687a7a0f878c94a0be41513ac92d 100644 (file)
@@ -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;
        }