Skip to content

Commit

Permalink
fix: rewrite the EOCD/EOCD64 detection to fix extreme performance reg…
Browse files Browse the repository at this point in the history
…ression (#247)

* fix: resolve clippy warning in nightly

* wip: major rework of cde location

* wip: rework CDE lookup

* refactor: magic finder, eocd lookup retry

* wip: handle empty zips

* fix: satisfy tests, add documentation

* chore: remove unused dependencies

* feat: support both zip32 and zip64 comments

* feat: add zip64 comment functions to ZipWriter

* fix: first pass on maintainer comments

* fix: continue searching for EOCD when the central directory is invalid

* chore: satisfy clippy lints

* chore: satisfy style_and_docs

* feat: support both directions in MagicFinder, correctly find first CDFH

* fix: more checks to EOCD parsing, move comment size error from parse to write

* fix: use saturating add when checking eocd64 record_size upper bound

* fix: correctly handle mid window offsets in forward mode

* fix: compare maximum possible comment length against file size, not search region end

* feat: handle zip64 detection as a hint

* fix: detect oversized central directories when locating EOCD64

* fix: oopsie

---------

Signed-off-by: Chris Hennick <[email protected]>
Co-authored-by: Chris Hennick <[email protected]>
  • Loading branch information
RisaI and Pr0methean authored Dec 16, 2024
1 parent 810d18a commit 33c71cc
Show file tree
Hide file tree
Showing 6 changed files with 796 additions and 513 deletions.
Loading

0 comments on commit 33c71cc

Please sign in to comment.