List Archive


Thread Index


From: Thomas Klausner <>
To: Jakub Vlášek <>
Subject: Re: Inconsistent zip64 archive generated by Total Commander
Date: Sat, 14 Jan 2017 01:51:35 +0100

Hi Jakub!

On Fri, Jan 13, 2017 at 05:13:01PM +0100, Jakub Vlášek wrote:
>     I have came across a large 10GB zip with 200k files  created on windows
> by Total Commander. Opening of this file failed with Inconsistent archive
> error.
> After some debugging, I have found that the extended_fields' disk_number is
> not set to ZIP_UINT16_MAX and therefore the file fails to open.

Oh no.

> Adding _zip_buffer_skip to _zip_dirent_read() fixed this, however I do not
> know whether the checks there are intentional and essentially removing them
> could have some other side effect.

This will break standard compliant zip archivers.

Please tell Total Commander to fix the bug.

From the ZIP specification:

   4.4.13 disk number start: (2 bytes)

       The number of the disk on which this file begins.  If an
       archive is in ZIP64 format and the value in this field is
       0xFFFF, the size will be in the corresponding 4 byte zip64
       extended information extra field.

and later

      The order of the fields in the zip64 extended 
      information record is fixed, but the fields MUST
      only appear if the corresponding Local or Central
      directory record field is set to 0xFFFF or 0xFFFFFFFF.


Made by MHonArc.