Skip to content

fix: isolate ZIP reader errors and preserve full entry names - #1040

Merged
andiwand merged 1 commit into
mainfrom
review/22-archive-metadata
Oct 5, 2026
Merged

andiwand merged 1 commit into
mainfrom
review/22-archive-metadata

Conversation

@andiwand

@andiwand andiwand commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

ZIP entries with names longer than miniz's fixed stat buffer were truncated and could collide in the filesystem view. Read the full filename length, reject embedded NULs, and include archive identity when comparing entries.

Each extraction and metadata read now copies miniz's mutable error state while sharing its immutable directory data. Concurrent failures and early stream closure no longer write the same error field. Check entry-size and stream-offset conversions, reject unseekable output, and clean up initialization that throws.

Validation: 142 ZIP, document-file, ODF, and OOXML tests pass, including long-name separation, concurrent corrupt reads, successful parallel reads, and allocation cleanup after early closure.

@andiwand
andiwand force-pushed the review/21-xml-input branch from 058564a to 8421f8e Compare October 5, 2026 06:46
Base automatically changed from review/21-xml-input to main October 5, 2026 06:55
@andiwand
andiwand force-pushed the review/22-archive-metadata branch from cdcec94 to 84f1751 Compare October 5, 2026 07:02
@andiwand
andiwand merged commit a9a6437 into main Oct 5, 2026
23 checks passed
@andiwand
andiwand deleted the review/22-archive-metadata branch October 5, 2026 07:04
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.

1 participant