Add try-catch on parsing extra zip fields, assuming it's safe to do so #23

Closed
opened 2026-01-29 21:16:39 +00:00 by claunia · 0 comments
Owner

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); at c15809dd72/SabreTools.Serialization/Readers/PKZIP.cs (L579) . When extracting with 7z or unzip, 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.

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);` at https://github.com/SabreTools/SabreTools.Serialization/blob/c15809dd7275fce54748468c187c5258e2ac210c/SabreTools.Serialization/Readers/PKZIP.cs#L579 . When extracting with `7z` or `unzip`, 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/SabreTools.Serialization#23