pbzip2 1.1.x hangs when decompressing certain truncated archives
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
pbzip2 | Status tracked in Trunk | |||||
1.1 |
Fix Released
|
High
|
Yavor Nikolov | |||
2.0 |
New
|
Undecided
|
Unassigned | |||
Trunk |
New
|
Undecided
|
Yavor Nikolov |
Bug Description
On attempt to decompress some truncated bz2 archives (sample one to be attached) pbzip2 1.1.x hangs. E.g. - following hangs at 67%:
pbzip2 -d -v -k -f trunctest1.bz2
Parallel BZIP2 v1.1.2b3 - by: Jeff Gilchrist [http://
[May. 20, 2010] (uses libbzip2 by Julian Seward)
Major contributions: Yavor Nikolov <email address hidden>
# CPUs: 2
Maximum Memory: 100 MB
-------
File #: 1 of 1
Input Name: trunctest1.bz2
Output Name: trunctest1
BWT Block Size: 400k
Input Size: 2355200 bytes
Decompressing data...
^Cmpleted: 67%
*Control-C or similar caught [sig=2], quitting...
Terminator thread: premature exit requested - quitting...
Cleanup unfinished work [Outfile: trunctest1]...
Deleting output file: trunctest1, if it exists...
pbzip2: *INFO: Deletion of output file succeeded.
pbzip2-2 port doesn't hang but finishes without any error messages silently ignoring the fact archive is invalid since has been truncated.
Changed in pbzip2: | |
status: | In Progress → Fix Committed |
Issue has been identified following condition after decompress should trigger an error: >isLastInSequen ce )
( (bzret != BZ_STREAM_END) && fileData-
since it indicates premature input truncation.