From e51a6a8cac354f4e7a709b17f047f1fc709882d8 Mon Sep 17 00:00:00 2001 From: "Val S." Date: Thu, 9 Oct 2025 17:40:14 -0400 Subject: [PATCH] Fix ZIP parser issue The function which indexes a ZIP central directory is not advancing to the next central directory record thus exceeding the max-files scan limit for many ZIPs. CLAM-2884 --- libclamav/unzip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libclamav/unzip.c b/libclamav/unzip.c index 90920ec5b..d635522b8 100644 --- a/libclamav/unzip.c +++ b/libclamav/unzip.c @@ -2075,6 +2075,9 @@ cl_error_t unzip_search(cli_ctx *ctx, struct zip_requests *requests) status = CL_ETIMEOUT; goto done; } + + // Increment to the next central file header. + central_file_header_offset += file_record_size; } while ((ret == CL_SUCCESS) && (file_record_size > 0)); } else { cli_dbgmsg("unzip_search: Cannot locate central directory. unzip_search failed.\n");