mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-02-05 05:37:46 +00:00
Add try-catch on parsing extra zip fields, assuming it's safe to do so #23
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?
Originally created by @HeroponRikiBestest on GitHub (Jan 29, 2026).
When extracting the embedded zip from within WorldwideSoccerManager2008_dd_setup_v802.exe, the PKZIP reader will throw an exception when reading the extra fields with
obj.ExtraFields = ParseExtraFields(obj, extraBytes);atc15809dd72/SabreTools.Serialization/Readers/PKZIP.cs (L579). When extracting with7zorunzip, both of them note that there's a headers error, but continue extracting properly with no further issues. If I add an empty try-catch around the aforementioned line in the PKZIP reader, the entire zip will extract properly with no further issues in extractiontool as well. The fact that unzip and 7z both work in this case and don't bail out further leads me to believe that this is safe, but I admit that I'm not knowledgeable enough on pkzip to know that for sure.