Bug 1053511 - gzip -l & integer overflow
Summary: gzip -l & integer overflow
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gzip
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Luscon
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-15 10:50 UTC by Need Real Name
Modified: 2014-01-17 11:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-17 11:32:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2014-01-15 10:50:41 UTC
gzip -l shows incorrect data for large files (integer overflow)
for example 
# ll  backup.gz 
253542016 -rw-------. 1 root root 259626991897 Jan 14 02:12 backup.gz

# gzip  -l backup.gz 
         compressed        uncompressed  ratio uncompressed_name
       259626991897          2299183104 -11192.1% backup

see negative numbers in gzip -l
Same thing for gzip 1.4 & gzip 1.6

Comment 1 Petr Stodulka 2014-01-17 11:32:25 UTC
This problem is known. Same problem was reported here: 
https://bugzilla.redhat.com/show_bug.cgi?id=116967

Problem is the uncompressed file size is stored in 32b format. See man gzip section BUGS. If you want know real uncompressed size, you can use "zcat file.gz | wc -c" - unfortunately it's very slow solution for so large files.


Note You need to log in before you can comment on or make changes to this bug.