Browse code

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

Val S. authored on 2025/10/10 06:40:14
Showing 1 changed files
... ...
@@ -2075,6 +2075,9 @@ cl_error_t unzip_search(cli_ctx *ctx, struct zip_requests *requests)
2075 2075
                 status = CL_ETIMEOUT;
2076 2076
                 goto done;
2077 2077
             }
2078
+
2079
+            // Increment to the next central file header.
2080
+            central_file_header_offset += file_record_size;
2078 2081
         } while ((ret == CL_SUCCESS) && (file_record_size > 0));
2079 2082
     } else {
2080 2083
         cli_dbgmsg("unzip_search: Cannot locate central directory. unzip_search failed.\n");