mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-02-04 05:36:12 +00:00
Correct mszip extraction on some cabs currently relies on an exception being thrown #17
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 (Nov 30, 2025).
To preface; technically, there's no issue with mszip extraction (that I know of) right now; what I describe results in the proper file data being extracted.
At the moment, on some mszip cabs, extraction will hit the following:
4b39ee8d00/SabreTools.Serialization/Wrappers/MicrosoftCabinet.cs (L268)The program will pad the block out to 32768 bytes, and write it to the stream.
Every time this happens, the immediate subsequent block will throw an exception on this line:
4b39ee8d00/SabreTools.Serialization/Wrappers/MicrosoftCabinet.cs (L262)Resulting in log output looking like this:
However, this doesn't actually seem to cause any issues. The resulting files that are extracted have all the right data, and match 1:1 against extraction from other programs like 7z.
Despite this, I'm opening an issue since it seems potentially dangerous to rely on an exception being thrown for proper output, especially if any other changes are made to this section. It also makes it more difficult to find actual issues in the console output.
This happens on some number of mszip cabs, but not all of them. The cab used in this issue was the 27-part cab inside
2K Sports Major League Baseball 2K9 (USA).isohttp://redump.org/disc/59967/ , where this occurs several times.Other examples include the multi-part cab inside
Singularity (Europe) (En,Fr,Es,It).isohttp://redump.org/disc/52122/ , insideLost Planet - Extreme Condition - Colonies Edition (Russia) (En,Ja,Fr,De,Es,It,Ko,Pl,Ru) (Disc 1)http://redump.org/disc/80571/ , and insideBrothers in Arms - Hell's Highway (Germany) (En,De)http://redump.org/disc/85478/ . More examples can be provided if necessary.@mnadareski commented on GitHub (Jan 5, 2026):
Reopening as the first PR doesn't fully cover this, as already discussed with @HeroponRikiBestest