diff options
author | Anatol Belski <ab@php.net> | 2016-07-05 10:34:25 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-07-05 10:35:19 +0200 |
commit | 41622c86bd0f404c5099822efc696485c033f56d (patch) | |
tree | 82a2ff8b226e5a937c21ffa4318189fcd4ae0c26 /ext/intl | |
parent | 818a47c24a90243893e97dbc7c2e833667d5e670 (diff) | |
download | php-git-41622c86bd0f404c5099822efc696485c033f56d.tar.gz |
Revert "fix datatype and add range check"
This reverts commit 14bdd8246c50b55d1ddf838b45de34065e8613c4.
Diffstat (limited to 'ext/intl')
-rw-r--r-- | ext/intl/uchar/uchar.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/ext/intl/uchar/uchar.c b/ext/intl/uchar/uchar.c index 272cb22157..abb3e59671 100644 --- a/ext/intl/uchar/uchar.c +++ b/ext/intl/uchar/uchar.c @@ -8,17 +8,10 @@ static inline int convert_cp(UChar32* pcp, zval *zcp) { zend_long cp = -1; - - if (ZEND_SIZE_T_INT_OVFL(Z_STRLEN_P(zcp))) { - intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR); - intl_error_set_custom_msg(NULL, "Input string is too long.", 0); - return FAILURE; - } - if (Z_TYPE_P(zcp) == IS_LONG) { cp = Z_LVAL_P(zcp); } else if (Z_TYPE_P(zcp) == IS_STRING) { - int32_t i = 0; + size_t i = 0; U8_NEXT(Z_STRVAL_P(zcp), i, Z_STRLEN_P(zcp), cp); if (i != Z_STRLEN_P(zcp)) { intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR); |