[php-src] PHP-8.5: Merge branch 'PHP-8.4' into PHP-8.5

From: Date: Tue, 21 Oct 2025 17:39:54 +0000
Subject: [php-src] PHP-8.5: Merge branch 'PHP-8.4' into PHP-8.5
Groups: php.cvs 
Request: Send a blank email to [email protected] to get a copy of this message
Author: Niels Dossche (nielsdos)
Date: 2025-10-21T19:36:42+02:00

Commit: https://github.com/php/php-src/commit/d05f88e228cd7cc639c1e31ec02464b45252c53e
Raw diff: https://github.com/php/php-src/commit/d05f88e228cd7cc639c1e31ec02464b45252c53e.diff

Merge branch 'PHP-8.4' into PHP-8.5

* PHP-8.4:
  phar: Fix file descriptor leak in phar_zip_flush() on failure.

Changed paths:
  M  ext/phar/zip.c


Diff:

diff --git a/ext/phar/zip.c b/ext/phar/zip.c
index 8c4d80ed1eac..085f9198c61c 100644
--- a/ext/phar/zip.c
+++ b/ext/phar/zip.c
@@ -1278,6 +1278,7 @@ void phar_zip_flush(phar_archive_data *phar, zend_string *user_stub, bool
is_def
 			return;
 		}
 		if (phar->alias_len != php_stream_write(entry.fp, phar->alias, phar->alias_len)) {
+			php_stream_close(entry.fp);
 			if (error) {
 				spprintf(error, 0, "unable to set alias in zip-based phar \"%s\"",
phar->fname);
 			}


Thread (1 message)

  • Niels Dossche
« previous php.cvs (#136495) next »