[php-src] PR #19715: Fix memory leak in zip when encountering empty glob result
| From: | nielsdos | Date: | Thu, 04 Sep 2025 20:47:42 +0000 |
| Subject: | [php-src] PR #19715: Fix memory leak in zip when encountering empty glob result | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-33084@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/19715
Author: nielsdos
The case of returning 0 is inconsistent in when it returns an empty array, furthermore the caller
already returns an empty array. Because the caller overwrites the return value in these cases, it
can cause a memory leak.
This is easier to trigger on master in some cases as different code paths are taken with the new
bundled glob. On some platforms it is also triggerable on 8.3.