-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7-Zip reports Headers Error #44
Comments
Extra fields need to have a 2-byte long size field after type field. Zip64 record in file header did not have this field. Fixes issue barracudanetworks#44 for recent version of 7-Zip: * 18.01 reports OK. * 16.02 still reports Headers Errror.
7-Zip version 16.02 complaints with Headers Error if there is 0xFFFF. Even when Zip64 EOF has the correct value. Fixes barracudanetworks#44 in 7-Zip version 16.02.
These two commits fix issue mentioned above. Both mentioned versions (16.02 and 18.01) of 7-Zip report OK. Output of 16.02 on Debian:
|
I've encountered similar issues with .zip files created via Windows (eg. (Send to > Compressed (zipped) folder" in File Explorer) resulting in vague "Headers Error" errors and unzipping to 0-byte file as well as "Warning: There are some data after the end of the payload data" (which does at least unzip correctly) for all versions of 7-zip (from recent v18.06 back to v9.20 in 2010, both 64-bit and 32-bit via GUI and command line). Even verbose command line options and Test archive fail to provide any further details. As WinRAR, Windows Extract and other utilities handle these zips just fine, despite mismatched CRC and/or file size, 7-Zip should do the same, instead of producing needlessly corrupted 0-byte files as it does now (with Headers Error), and should therefore also be consistent with cases where file is at the end of the archive, instead of showing a "Data after payload" warning while still correctly extracting the non-zero-sized file as is the case now. Strangely, other utilities such as WinRAR and Windows Extract unzip just fine and even perform Test archive without reporting anything, despite showing the same mismatched when using WinRAR to inspect the file properties, when at least WinRAR should be at least showing a warning message in such cases. I've reported this bug to 7-Zip here, where I've also referenced your issue report here as one of a number of examples of 7-zip failing to handle this correctly like other zip utilities. If you also believe that 7-Zip should fix this inconsistency and be able to correctly unzip such .zip files (albeit with a warning) without needlessly producing a corrupted 0-byte file instead for some of the files in those archives, then I'd welcome your input and thoughts on the priority of this via comments on my bug report on SourceForge for 7-Zip. |
Something else to try, if the ZIP file is > 4 GB and was created by OneDrive or Windows, is a utility designed to fix-up the headers: Apparently, there's some disagreement about how to handle the "file count" header for Zip64 files. Microsoft products expect that the file count header should be 0 while other systems expect it to be 1. Newer versions of 7-zip for Windows (versions 19+) handle the issue fine but Linux only has an older POSIX port, p7zip, that is version 16 from 2016, and it does not have a way to handle this issue. If you're curious, someone did a deep-dive on the issue here: |
Came across this issue in This might also be happening here. The |
Recent versions of 7-Zip report an error for any zip file created with ArchiveStream.
example.zip
was created using the following code:PHP output was simply redirected to ZIP file:
Older 7-Zip versions (for example 9.20) do not report any problems about the same file:
Most of out clients use Windows. Some of them reported difficulties to extract our ZIP files. Recommended them to use 7-Zip, downloaded recent version (18.01) tested a file, got
Headers Error
.The text was updated successfully, but these errors were encountered: