Preemptively allocating structures with the number of reported files can lead to trouble as an invalid zip can still have a valid central directory end that is fed into a `with_capacity` causing it to overflow. This commit introduces a heuristic that will use the reported number of files as long as the number is less than the cde offset. Benchmarks were unaffected by this change. |
||
---|---|---|
.. | ||
aes_archive.zip | ||
comment_garbage.zip | ||
files_and_dirs.zip | ||
invalid_cde_number_of_files_allocation_greater_offset.zip | ||
invalid_cde_number_of_files_allocation_smaller_offset.zip | ||
invalid_offset.zip | ||
invalid_offset2.zip | ||
mimetype.zip | ||
zip64_demo.zip |