History log of /PHP-8.3/ext/standard/tests/array/range/gh13094.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# 1d6f344b 09-Jan-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-13094: range(9.9, '0') causes segmentation fault

`start_type + end_type < 2*IS_STRING` is not right, in this test case
the types are start_type==5 (IS_DOUBLE), end_type==7 (IS_ARR

Fix GH-13094: range(9.9, '0') causes segmentation fault

`start_type + end_type < 2*IS_STRING` is not right, in this test case
the types are start_type==5 (IS_DOUBLE), end_type==7 (IS_ARRAY).
The IS_ARRAY type is a sentinel to disambiguate single-byte strings.
The path must be taken when one of the types is not a string nor a
single-byte string. Therefore, use < IS_STRING with an OR condition.

Closes GH-13105.

show more ...