Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std.zip: Add ZIP64 support for local file header extra field #22408

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

axlEscalada
Copy link
Contributor

This PR adds support for handling ZIP64 format in local file headers, when a zip file contains entries where the compressed or uncompressed size fields are set to 0xFFFFFFFF, and the extra field contains ZIP64 extended information tag (0x0001)

The code now:

  • Reads the actual sizes from the ZIP64 extra field data
  • Validates these sizes against the entry's compressed and uncompressed sizes

Zip file format spec.: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

This change allows proper extraction of ZIP files that use ZIP64 format in their local file headers, fixing issue #22329

@axlEscalada axlEscalada changed the title Add ZIP64 support for local file header extra field std.zip: Add ZIP64 support for local file header extra field Jan 4, 2025
lib/std/zip.zig Outdated Show resolved Hide resolved
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