Skip to content

Commit 8212593

Browse files
authored
phar: Stop early in compression test loop (php#20142)
1 parent 70c6a08 commit 8212593

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/phar/phar_object.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3169,12 +3169,14 @@ static int phar_test_compression(zval *zv, void *argument) /* {{{ */
31693169
if (!PHAR_G(has_bz2)) {
31703170
if (entry->flags & PHAR_ENT_COMPRESSED_BZ2) {
31713171
*(int *) argument = 0;
3172+
return ZEND_HASH_APPLY_STOP;
31723173
}
31733174
}
31743175

31753176
if (!PHAR_G(has_zlib)) {
31763177
if (entry->flags & PHAR_ENT_COMPRESSED_GZ) {
31773178
*(int *) argument = 0;
3179+
return ZEND_HASH_APPLY_STOP;
31783180
}
31793181
}
31803182

0 commit comments

Comments
 (0)