mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #972] [MERGED] Handle vendor-specific and malformed ZIP extra fields safely #1387
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/972
Author: @TwanVanDongen
Created: 10/24/2025
Status: ✅ Merged
Merged: 10/25/2025
Merged by: @adamhathcock
Base:
master← Head:master📝 Commits (1)
6d652a1And again forgot to apply CSharpierAdds bounds checks to prevent exceptions when extra fields are truncated or non-standard (e.g., 0x4341 "AC"/ARC0). Stops parsing gracefully, allowing other fields to be processed.📊 Changes
2 files changed (+22 additions, -5 deletions)
View changed files
📝
src/SharpCompress/Common/Zip/Headers/ZipFileEntry.cs(+19 -2)📝
src/SharpCompress/packages.lock.json(+3 -3)📄 Description
Adds bounds checks to prevent exceptions when extra fields are truncated or non-standard (e.g., 0x4341 "AC"/ARC0). Stops parsing gracefully, allowing other fields to be processed.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.