1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

phar: Stop early in compression test loop (#20142)

This commit is contained in:
Niels Dossche
2025-10-11 23:59:30 +02:00
committed by GitHub
parent 70c6a08863
commit 8212593694

View File

@@ -3169,12 +3169,14 @@ static int phar_test_compression(zval *zv, void *argument) /* {{{ */
if (!PHAR_G(has_bz2)) {
if (entry->flags & PHAR_ENT_COMPRESSED_BZ2) {
*(int *) argument = 0;
return ZEND_HASH_APPLY_STOP;
}
}
if (!PHAR_G(has_zlib)) {
if (entry->flags & PHAR_ENT_COMPRESSED_GZ) {
*(int *) argument = 0;
return ZEND_HASH_APPLY_STOP;
}
}