mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Fix GH-13309 and GH-13310: array hashes comparison, wrong buffer len calculation.
php_array_key_compare_string_case_unstable_i has a typo for the second operand resulting in a wrong buffer size calculation. Issue reported by @AlexRudyuk Close GH-13315
This commit is contained in:
parent
7d5a96614c
commit
d91224cd2f
2 changed files with 5 additions and 1 deletions
4
NEWS
4
NEWS
|
@ -2,6 +2,10 @@ PHP NEWS
|
||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||
?? ??? ????, PHP 8.2.17
|
?? ??? ????, PHP 8.2.17
|
||||||
|
|
||||||
|
- Core:
|
||||||
|
. Fixed array key as string (case insensitive) comparison typo
|
||||||
|
for the second operand buffer size. (A. Slepykh)
|
||||||
|
|
||||||
- Curl:
|
- Curl:
|
||||||
. Fix failing tests due to string changes in libcurl 8.6.0. (Ayesh)
|
. Fix failing tests due to string changes in libcurl 8.6.0. (Ayesh)
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ static zend_always_inline int php_array_key_compare_string_case_unstable_i(Bucke
|
||||||
l2 = s->key->len;
|
l2 = s->key->len;
|
||||||
} else {
|
} else {
|
||||||
s2 = zend_print_long_to_buf(buf2 + sizeof(buf2) - 1, s->h);
|
s2 = zend_print_long_to_buf(buf2 + sizeof(buf2) - 1, s->h);
|
||||||
l2 = buf2 + sizeof(buf2) - 1 - s1;
|
l2 = buf2 + sizeof(buf2) - 1 - s2;
|
||||||
}
|
}
|
||||||
return zend_binary_strcasecmp_l(s1, l1, s2, l2);
|
return zend_binary_strcasecmp_l(s1, l1, s2, l2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue