UnshieldSharp icon indicating copy to clipboard operation
UnshieldSharp copied to clipboard

"Failed to read 2 bytes of file X" in specific archive

Open TheRogueArchivist opened this issue 1 year ago • 1 comments

To reproduce:

  • Get the file "sdcc_200.zip" from from "CICA 32 For Windows CD-ROM (Walnut Creek) (October 1999) (Disc 4).iso" in https://archive.org/details/CICA_32_For_Windows_CD-
  • Add the "DATA[2-4].CAB" files from the "DISK[2-4]" folders into the "DISK1" folder.
  • Extract "DATA1.HDR" using UnshieldSharp.

Several files fail to extract properly, as seen in the log:

Outputting file at index 0 to /home/nyxh/DISK1/0/SDCC_D.exe...
Failed to read 2 bytes of file 0 (SDCC_D.exe) from input cabinet file 65535
Outputting file at index 1 to /home/nyxh/DISK1/0/og70as.dll...
Outputting file at index 2 to /home/nyxh/DISK1/0/sdcc_eng.dll...
Outputting file at index 3 to /home/nyxh/DISK1/0/sdcc.mdb...
Outputting file at index 4 to /home/nyxh/DISK1/0/sdcc_dem.mdb...
Outputting file at index 5 to /home/nyxh/DISK1/0/sdcc_eng.mdb...
Outputting file at index 6 to /home/nyxh/DISK1/0/Msvcrt.dll...
Outputting file at index 7 to /home/nyxh/DISK1/0/mfc42.dll...
Failed to read 2 bytes of file 7 (mfc42.dll) from input cabinet file 2
Outputting file at index 8 to /home/nyxh/DISK1/0/dao350.dll...
Outputting file at index 9 to /home/nyxh/DISK1/0/Dao2535.tlb...
Outputting file at index 10 to /home/nyxh/DISK1/0/Msvcrt40.dll...
Outputting file at index 11 to /home/nyxh/DISK1/0/msjter35.dll...
Outputting file at index 12 to /home/nyxh/DISK1/0/Msjint35.dll...
Outputting file at index 13 to /home/nyxh/DISK1/0/Oleaut32.dll...
Outputting file at index 14 to /home/nyxh/DISK1/0/Stdole2.tlb...
Outputting file at index 15 to /home/nyxh/DISK1/0/vbar332.dll...
Outputting file at index 16 to /home/nyxh/DISK1/0/vbajet32.dll...
Outputting file at index 17 to /home/nyxh/DISK1/0/msjet35.dll...
Failed to read 2 bytes of file 17 (msjet35.dll) from input cabinet file 3
Outputting file at index 18 to /home/nyxh/DISK1/0/msrd2x35.dll...
Outputting file at index 19 to /home/nyxh/DISK1/0/Sdcc.hlp...
Outputting file at index 20 to /home/nyxh/DISK1/0/sdcc.cnt...
Outputting file at index 21 to /home/nyxh/DISK1/0/Sdcc_eng.hlp...
Outputting file at index 22 to /home/nyxh/DISK1/0/sdcc_eng.cnt...
Outputting file at index 23 to /home/nyxh/DISK1/0/Guide_r.doc...
Outputting file at index 24 to /home/nyxh/DISK1/0/Guide_e.doc...

I confirmed the hash of the file that US extracts is different from the hash of the file that the installer extracts. These same files also error in the original Unshield, so this is not a bug specific to US.

TheRogueArchivist avatar Oct 02 '24 04:10 TheRogueArchivist

This likely has something to do with either the boundary between cabinets (which lines up with which files are having issues) or with a specific version of zlib being used.

mnadareski avatar Oct 02 '24 04:10 mnadareski