kyz / libmspack

A library for some loosely related Microsoft compression formats, CAB, CHM, HLP, LIT, KWAJ and SZDD.
https://www.cabextract.org.uk/libmspack/
169 stars 45 forks source link

Added CAB decompression parameter MSCABD_PARAM_SALVAGE #18

Closed micahsnyder closed 6 years ago

micahsnyder commented 6 years ago

Added CAB decompression parameter MSCABD_PARAM_SALVAGE which makes a best effort to extract as many files as possible from damaged, mangled, malformed or otherwise non-standard CAB archives.

kyz commented 6 years ago

Thanks very much for this!

For context, you and I have been discussing merging the differences between ClamAV's copy of libmspack into libmspack proper, and most of the changes are to be more forgiving about non-compliant / broken CAB files, provided it gets to the data inside them.

So, the addition of a SALVAGE mode means you can turn this feature on and get at data no matter how broken a file is. I'll also be adding this to cabextract's existing "-f" flag, which is already used to salvage broken MSZIP files.

micahsnyder commented 6 years ago

Thanks for the collaboration, and for the in-depth analysis of the non-standard/broken CAB files. We definitely appreciate it.