Skip to content

Commit

Permalink
Fix typo (wrong string length)
Browse files Browse the repository at this point in the history
Fixes oss-fuzz #44110
  • Loading branch information
dstogov committed Jan 28, 2022
1 parent 07aaa34 commit 464e725
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Zend/zend_operators.c
Expand Up @@ -1926,7 +1926,7 @@ ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, zend
int ret;

if (case_insensitive) {
ret = zend_binary_strcasecmp_l(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str1));
ret = zend_binary_strcasecmp_l(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str2));
} else {
ret = zend_binary_strcmp(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str2));
}
Expand Down Expand Up @@ -1972,7 +1972,7 @@ ZEND_API int ZEND_FASTCALL string_case_compare_function(zval *op1, zval *op2) /*
zend_string *tmp_str1, *tmp_str2;
zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1);
zend_string *str2 = zval_get_tmp_string(op2, &tmp_str2);
int ret = zend_binary_strcasecmp_l(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str1));
int ret = zend_binary_strcasecmp_l(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str2));

zend_tmp_string_release(tmp_str1);
zend_tmp_string_release(tmp_str2);
Expand Down

0 comments on commit 464e725

Please sign in to comment.