Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1b49d0e

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Fix memory leak in zip when encountering empty glob result
2 parents 924eea4 + 216e87a commit 1b49d0e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ PHP NEWS
5050
. Remove incorrect call to zval_ptr_dtor() in user_wrapper_metadata().
5151
(nielsdos)
5252

53+
- Zip:
54+
. Fix memory leak in zip when encountering empty glob result. (nielsdos)
55+
5356
28 Aug 2025, PHP 8.4.12
5457

5558
- Core:

‎ext/zip/php_zip.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,6 @@ int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_v
667667
can be used for simple glob() calls without further error
668668
checking.
669669
*/
670-
array_init(return_value);
671670
return 0;
672671
}
673672
#endif
@@ -676,7 +675,6 @@ int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_v
676675

677676
/* now catch the FreeBSD style of "no matches" */
678677
if (!globbuf.gl_pathc || !globbuf.gl_pathv) {
679-
array_init(return_value);
680678
return 0;
681679
}
682680

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /