Bug 318031 - uncompress() doesn't work
Summary: uncompress() doesn't work
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: zlib (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: All Linux
low
low
Target Milestone: ---
Assignee: Ivana Varekova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-04 10:27 UTC by Bastien Nocera
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-10 07:00:22 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test.c (2.42 KB, text/plain)
2007-10-04 10:27 UTC, Bastien Nocera
no flags Details

Description Bastien Nocera 2007-10-04 10:27:58 UTC
zlib-1.2.3-14.fc8

Attached is a test program for zlib's uncompress(). It returns -3 (Z_DATA_ERROR)
for every file I created.

1. Copy a test file locally, make a note of the uncompressed size
2. Compress it with gzip
3. Run ./test on the compressed file, verify that the uncompressed length
matches the one in 1, and wonder why it can't uncompress the data

Comment 1 Bastien Nocera 2007-10-04 10:27:58 UTC
Created attachment 215651 [details]
test.c

Comment 2 Bastien Nocera 2007-10-08 11:34:34 UTC
Ivana tells me that uncompress() only works when passed the data, and no
trailing data, or headers data.

But the documentation says:
"This function can be used to decompress a whole file at once if the input file
is mmap'ed."

The documentation should be fixed:
"This function can be used to decompress a whole file at once if the input file
is mmap'ed, and headers and trailing data are stripped from the input."


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