Bug 16048

Summary: unzip cannot extract big zip files
Product: Busybox Reporter: diego.ml
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.36.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description diego.ml 2024-04-23 12:32:16 UTC
busybox unzip cannot extract or even list files in big zip archives.

Example file: https://testfile.org/files-5GB-zip

Steps to reproduce:
~~~
$ busybox unzip -v
BusyBox v1.36.1 (Debian 1:1.36.1-6) multi-call binary.

Usage: unzip [-lnojpqK] FILE[.zip] [FILE]... [-x FILE]... [-d DIR]

Extract FILEs from ZIP archive

        -l      List contents (with -q for short form)
        -n      Never overwrite files (default: ask)
        -o      Overwrite
        -j      Do not restore paths
        -p      Write to stdout
        -t      Test
        -q      Quiet
        -K      Do not clear SUID bit
        -x FILE Exclude FILEs
        -d DIR  Extract into DIR
$ busybox unzip -l files-5GB-zip 
Archive:  files-5GB-zip
  Length      Date    Time    Name
---------  ---------- -----   ----
unzip: short read
~~~

Official unzip and python3 -m zipfile (https://docs.python.org/3/library/zipfile.html#command-line-interface) can list and extract the same zip file.