Menu

#1170 Zip unpacking int32 file size overflow

closed-rejected
nobody
None
5
2010-11-18
2010-11-18
rsashka
No

When unpacking a large file, which is in the zip archive is cut off its size by 2 ^ 32 bytes.

For example, a file size: 5,947,556,352 bytes unpacked only the first 1,652,589,056 bytes, and the process terminate in error.

You can check the file: http://sourceforge.net/projects/lru/files/VM/ava360lts.zip/download
File inside the archive: AVA360lts \ AVA360lts_Debian.vdi with the size of 5,947,556,352 bytes

Checked for Windows version 9.19 beta and the previous

Regards,

rsashka
www.adempiere.ru

Discussion

  • Igor Pavlov

    Igor Pavlov - 2010-11-18

    show here log for commands:

    7z l ava360lts.zip -slt > log.txt
    7z t ava360lts.zip -scrc >> log.txt

     
  • rsashka

    rsashka - 2010-11-18
     
  • rsashka

    rsashka - 2010-11-18

    Log commands

    7z.exe l -slt ava360lts.zip > log.txt
    7z.exe l -scrc ava360lts.zip >> log.txt

    in attached file

     
  • Igor Pavlov

    Igor Pavlov - 2010-11-18

    1) As I can see, Uncompressed size of "AVA360lts\AVA360lts_Debian.vdi" is incorrect.
    Prtobably it was created with wrong software that doesn't support zip-64 format.

    Is the any archiver (WinZip / WinRAR or something else) that can unpack that archive?

     
  • rsashka

    rsashka - 2010-11-18

    Yes, WinRAR unpacked this archive correctly.

    The archive file is created in MAC OS X, but I don `t know what version of archiver.

     
  • Igor Pavlov

    Igor Pavlov - 2010-11-18

    What version of WinRAR?
    What uncompressed size do you see for that file when you open that file in WinRAR?

     
  • rsashka

    rsashka - 2010-11-18

    Hm...

    WinRAR show file size 1 652 595 500 bytes and size in archive 3 368 780 858 bytes.
    i.e. size displayed not correctly, but after unpack file size all OK ;-)

    Versin WinRAR very new

     
  • Igor Pavlov

    Igor Pavlov - 2010-11-18
    • status: open --> closed-rejected
     
  • Igor Pavlov

    Igor Pavlov - 2010-11-18

    Conclision:

    ZIP Archive is incorrect.
    They use old zip headers, that support only 4 GB files.
    They don't use zip-64 headers.

    So unpack_size in header is 1.5 GB.
    WinRAR ignores unpack_size in header in header and unpacks whole stream.

    7-Zip uтpacks only data of 1.5 GB size (as mentioned in headers).

    Report about that bug to creators of that ZIP file.
    And suggest them to use latest version of p7zip instead.

     

Log in to post a comment.

MongoDB Logo MongoDB