Commit 565da77f127 for php.net
commit 565da77f1274ccbe38a215bebee6e687e163c9ec
Merge: 1e9506d4f53 a311f0502d6
Author: Ilia Alshanetsky <ilia@ilia.ws>
Date: Fri Jun 26 14:40:58 2026 -0400
Merge branch 'PHP-8.5'
* PHP-8.5:
Fix use-after-free in Collator::sort() with a mutating comparator
diff --cc ext/intl/collator/collator_sort.cpp
index 2b1122cb747,ca489a19eaf..b7c2b873659
--- a/ext/intl/collator/collator_sort.cpp
+++ b/ext/intl/collator/collator_sort.cpp
@@@ -260,8 -253,9 +260,9 @@@ static collator_compare_func_t collator
static void collator_sort_internal( int renumber, INTERNAL_FUNCTION_PARAMETERS )
{
UCollator* saved_collator;
- zval* array = NULL;
- HashTable* hash = NULL;
- zend_array* sorted = NULL;
+ zval* array = nullptr;
+ HashTable* hash = nullptr;
++ zend_array* sorted = nullptr;
zend_long sort_flags = COLLATOR_SORT_REGULAR;
COLLATOR_METHOD_INIT_VARS