jianlinwei / theunarchiver

Automatically exported from code.google.com/p/theunarchiver
Other
0 stars 0 forks source link

Can't extract Zip archive with zero-length files encrypted with AES #277

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To reproduce, try to extract the attached 
"WithZeroLengthFiles-AES256Encrypted.zip" file (password is "whatever").

The extract fails saying the archive is corrupt.

As the file name suggests, this archive was created with 7zip using AES-256 
instead of the standard Zip encryption.

The same archive encrypted with standard Zip encryption 
(WithZeroLengthFiles-NonAESEncrypted.zip) works fine.

After some investigation the problem seems to the be two zero-length files in 
the "script" subfolder. When not present in the archive everything works.

This post may be useful:
http://www.winzip.com/aes_info.htm#non-files

Original issue reported on code.google.com by philipp.mayerhofer on 9 Jun 2010 at 4:15

Attachments:

GoogleCodeExporter commented 9 years ago
Actually, since the last version, all WinZip AES files have been incorrectly 
reported as corrupted, it seems. WinZip AES removes the usual CRC check for 
files, and I broke the code that handles this when I updated the Zip code 
earlier. Should be fixed now.

Original comment by paracel...@gmail.com on 11 Jun 2010 at 11:09

GoogleCodeExporter commented 9 years ago
I'm afraid that the problem persists in the latest commit (445).

Original comment by philipp.mayerhofer on 18 Jun 2010 at 7:38

GoogleCodeExporter commented 9 years ago
Strange, it does. I was sure it was fixed.

Original comment by paracel...@gmail.com on 18 Jun 2010 at 8:20

GoogleCodeExporter commented 9 years ago
Turns out I found ANOTHER bug last time, and fixed that but only tested on 
other files, not this one.

Now I should have fixed this bug too.

Original comment by paracel...@gmail.com on 20 Jun 2010 at 10:14