diff options
author | Anatol Belski <ab@php.net> | 2014-09-16 12:48:15 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-09-16 21:17:19 +0200 |
commit | 49a6b485a0173b855e31ce8dc7800ac1672b6981 (patch) | |
tree | 11f027526bbc887f0106366b80106d20643db2a0 /ext | |
parent | db24742f01497208bfcef105a90f58eb595938de (diff) | |
download | php-git-49a6b485a0173b855e31ce8dc7800ac1672b6981.tar.gz |
redo the fix casting to size_t where applicable
Diffstat (limited to 'ext')
-rw-r--r-- | ext/mbstring/mbstring.c | 2 | ||||
-rw-r--r-- | ext/mbstring/php_mbregex.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index b2bceed426..615381e6c4 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2963,7 +2963,7 @@ PHP_FUNCTION(mb_strimwidth) string.val = (unsigned char *)str; string.len = str_len; - if (from < 0 || from > (zend_long)str_len) { + if (from < 0 || (size_t)from > str_len) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Start position is out of range"); RETURN_FALSE; } diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index d78131fff5..864d50a5ce 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -1403,7 +1403,7 @@ PHP_FUNCTION(mb_ereg_search_setpos) return; } - if (position < 0 || (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING && position >= (zend_long)Z_STRLEN(MBREX(search_str)))) { + if (position < 0 || (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING && (size_t)position >= Z_STRLEN(MBREX(search_str)))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Position is out of range"); MBREX(search_pos) = 0; RETURN_FALSE; |