Skip to content

Commit 3cde5ee

Browse files
committed
Zip: attempt to unzip when encrypted if we don't have a valid password
May enable extraction for files where a header lies about encryption.
1 parent 35cc376 commit 3cde5ee

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

libclamav/unzip.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,11 @@ static inline cl_error_t zdecrypt(
575575
pass_any = pass_any->next;
576576
}
577577

578-
cli_dbgmsg("cli_unzip: decrypt - skipping encrypted file, no valid passwords\n");
578+
cli_dbgmsg("cli_unzip: decrypt failed - will attempt to unzip as if it were not encrypted\n");
579+
580+
ret = unz(src, csize, usize, LOCAL_HEADER_method, LOCAL_HEADER_flags,
581+
num_files_unzipped, ctx, tmpd, zcb, original_filename, false);
582+
579583
return CL_SUCCESS;
580584
}
581585

0 commit comments

Comments
 (0)