Fix ZIP parser issue using central directory

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
This commit is contained in:
Val S. 2025-10-09 17:40:14 -04:00
parent 72eceaf144
commit b87b028a30
No known key found for this signature in database
GPG key ID: 3A7D293D8274CA1B

View file

@ -2075,6 +2075,9 @@ cl_error_t unzip_search(cli_ctx *ctx, struct zip_requests *requests)
status = CL_ETIMEOUT; status = CL_ETIMEOUT;
goto done; goto done;
} }
// Increment to the next central file header.
central_file_header_offset += file_record_size;
} while ((ret == CL_SUCCESS) && (file_record_size > 0)); } while ((ret == CL_SUCCESS) && (file_record_size > 0));
} else { } else {
cli_dbgmsg("unzip_search: Cannot locate central directory. unzip_search failed.\n"); cli_dbgmsg("unzip_search: Cannot locate central directory. unzip_search failed.\n");