Skip to content

rebase zip64 local-header offset in zip_entries_delete_mark#445

Merged
kuba-- merged 1 commit into
kuba--:masterfrom
jmestwa-coder:zip64-delete-offset-rebase
Jul 22, 2026
Merged

rebase zip64 local-header offset in zip_entries_delete_mark#445
kuba-- merged 1 commit into
kuba--:masterfrom
jmestwa-coder:zip64-delete-offset-rebase

Conversation

@jmestwa-coder

Copy link
Copy Markdown
Contributor

zip_entries_delete_mark rebases the wrong offset field for a zip64 entry:

  • after a delete shifts an entry data it rewrites the raw 32-bit central-directory offset field
  • a zip64 entry holds 0xFFFFFFFF there and keeps the real offset in an extra field, so the subtract turns the sentinel into 0xFFFFFFFF - deleted_length and leaves the extra field stale, and the survivor can no longer be located (read fails)
  • zip_cdh_set_local_offset now writes the resolved offset into the zip64 extra field for such entries and the 32-bit field otherwise

repro: craft a zip64 archive, delete a preceding entry, read the survivor back. test_entries_delete_zip64_offset fails on master and passes here.

@kuba--
kuba-- merged commit fabc24e into kuba--:master Jul 22, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants