We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7612ea8 + ad7b9f4 commit e004e1aCopy full SHA for e004e1a
NEWS
@@ -5,6 +5,9 @@ PHP NEWS
5
- FPM:
6
. Fixed ACL build check on MacOS. (David Carlier)
7
8
+- SPL:
9
+ . Fixed bug GH-8235 (iterator_count() may run indefinitely). (cmb)
10
+
11
- Zip:
12
. Fixed type for index in ZipArchive::replaceFile. (Martin Rehberger)
13
ext/spl/spl_iterators.c
@@ -3127,6 +3127,9 @@ PHP_FUNCTION(iterator_to_array)
3127
3128
static int spl_iterator_count_apply(zend_object_iterator *iter, void *puser) /* {{{ */
3129
{
3130
+ if (UNEXPECTED(*(zend_long*)puser == ZEND_LONG_MAX)) {
3131
+ return ZEND_HASH_APPLY_STOP;
3132
+ }
3133
(*(zend_long*)puser)++;
3134
return ZEND_HASH_APPLY_KEEP;
3135
}
0 commit comments