You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an issue of original minizip code (unzip.c), but I believe it could be fixed in QuaZip, because it is customized anyway. Issue is that in unzOpenInternal function "end of zip64 cemtral directory record" is looked for as a first thing (unz64local_SearchCentralDir64) and, if it fails, only after that end of central directory record is looked for. If zip64 end of central directory record is found, standard zip end of central directory record is ignored and comment length is set to 0 (
). Due to this, the comment is never found/loaded from the archive. It also allows for loading broken/incorrect archives - archive must always contain end of central directory record (see official APPNOTE.txt, 4.3.1), and this is not checked for ZIP64 archive.
I believe correct ordering is:
Locate end of central directory record (and read comment from there).
Only after that record is found, look before the record, to see if it contains "zip64 end of central directory locator" (this has fixed size and it must immediately precede the end of central directory record).
After the locator is found, use it to find zip64 end of central directory record.
This way, the comment from end of central directory record can be loaded for ZIP64 archive.
The text was updated successfully, but these errors were encountered:
This is an issue of original minizip code (unzip.c), but I believe it could be fixed in QuaZip, because it is customized anyway. Issue is that in unzOpenInternal function "end of zip64 cemtral directory record" is looked for as a first thing (unz64local_SearchCentralDir64) and, if it fails, only after that end of central directory record is looked for. If zip64 end of central directory record is found, standard zip end of central directory record is ignored and comment length is set to 0 (
quazip/quazip/unzip.c
Line 687 in 98bcb48
I believe correct ordering is:
This way, the comment from end of central directory record can be loaded for ZIP64 archive.
The text was updated successfully, but these errors were encountered: