Bug 116967 - 'gzip -l' has integer overflow problem
'gzip -l' has integer overflow problem
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gzip (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Ben Levenson
: 145490 443605 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2004-02-26 16:58 EST by Ian Soboroff
Modified: 2008-05-06 09:14 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-03-22 12:30:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ian Soboroff 2004-02-26 16:58:47 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

Description of problem:
Running 'gzip -l' to see the uncompressed size of a very large
compressed file results in integer overflows:

$ ls -gG data.1075704784.gz
-rw-r--r--    1 5256727374 Feb  2 04:12 data.1075704784.gz

$ gzip -l data.1075704784.gz
         compressed        uncompressed  ratio uncompressed_name
         5256727374          1921117289 -173.6% data.1075704784

$ gunzip data.1075704784.gz

$ ls -gG data.1075704784
-rw-r--r--    1 6216084585 Feb 26 15:11 data.1075704784

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
See description.  I can't send you the file in question, but it seems
to work for any file of comparable size (about 5 or 6GB uncompressed).

Actual Results:  See desc

Expected Results:  See desc

Additional info:
Comment 1 Tomas Mraz 2005-03-22 08:47:20 EST
*** Bug 145490 has been marked as a duplicate of this bug. ***
Comment 2 Tomas Mraz 2005-03-22 12:30:31 EST
The problem is the gzip format stores the uncompressed file size in 32 bits only
so it isn't possible to display correct uncompressed file size for large files
in the gzip -l command.

See man gzip section BUGS.
Comment 3 Ivana Varekova 2008-05-06 09:14:26 EDT
*** Bug 443605 has been marked as a duplicate of this bug. ***

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