[
https://issues.apache.org/jira/browse/COMPRESS-609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Madhu Gopanna updated COMPRESS-609:
-----------------------------------
Description:
Attached is a Bz2 Tar archive that on decompression does not include all
available entries (contents) and exit with an IO Exception. This change in
behavior maybe related to specific change log in 1.21 when compared to 1.20
behavior for the same Tar.
Bz2 Tar: Android /sample_images/sample_images.tar.bz2
#
## Missing:
### disk_ext2_4k.img
### disk_ext2_4k_empty.img
### disk_ext2_unittest.img
## Not missing:
### disk_ext2_1k.img
## Exception:
{code:java}
java.io.IOException: Corrupted TAR archive.
at
org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1597)
at
org.apache.commons.compress.archivers.tar.TarArchiveEntry.<init>(TarArchiveEntry.java:556)
at
org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:379)
at com.synopsys.sigcompcore.Application.main(Application.java:36)
Caused by: java.lang.IllegalArgumentException: Invalid byte 38 at offset 0 in
'& * ' len=8
at
org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:153)
at
org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:183)
at
org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseOctalOrBinary(TarArchiveEntry.java:1698)
at
org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeaderUnwrapped(TarArchiveEntry.java:1609)
at
org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1595)
... 3 more{code}
Expected behavior: Log the IO Exception and exit(1.21 behavior) from corrupted
Bz2 Tar after decompressing all available entries (1.20 behavior).
#
was:
Attached is a Bz2 Tar archive that on decompression does not include all
available entries (contents) and exit with an IO Exception. This change in
behavior maybe related to specific change log in 1.21 when compared to 1.20
behavior for the same Tars.
# Tar:
/gcc-8-8.3.0/gcc-8.3.0.tar.xz!/gcc-8.3.0/libgo/go/archive/tar/testdata/pax-bad-hdr-file.tar
## Missing:
### PAX1
### PAX1/PAX1
### /PAX1/PAX1/long-path-name
## Not missing: N/A
## Exception:
{code:java}
java.io.IOException: Failed to read Paxheader.Value should end with a newline
at
org.apache.commons.compress.archivers.tar.TarUtils.parsePaxHeaders(TarUtils.java:769)
at
org.apache.commons.compress.archivers.tar.TarArchiveInputStream.paxHeaders(TarArchiveInputStream.java:605)
at
org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:421)
at com.synopsys.sigcompcore.Application.main(Application.java:34) {code}
# Tar:
/gcc-8-8.3.0/gcc-8.3.0.tar.xz!/gcc-8.3.0/libgo/go/archive/tar/testdata/sparse-formats.tar
## Missing:
### end
### sparse-posix-0.0
### sparse-posix-0.1
### sparse-posix-1.0
## Not missing:
### sparse-gnu
## Exception:
{code:java}
java.io.IOException: Truncated TAR archive
at
org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:743)
at org.apache.commons.compress.utils.IOUtils.readFully(IOUtils.java:197)
at org.apache.commons.compress.utils.IOUtils.skip(IOUtils.java:129)
at
org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:364)
at com.synopsys.sigcompcore.Application.main(Application.java:35){code}
# Tar:
/gcc-6-6.1.1/gcc-6.1.0-dfsg.tar!/gcc-6.1.0/libgo/go/archive/tar/testdata/writer-big-long.tar
## Missing: 16gig.txt
## Not missing: N/A
## Exception:
{code:java}
java.io.IOException: Corrupted TAR archive, sparse entry is invalid
at
org.apache.commons.compress.archivers.tar.TarUtils.readSparseStructs(TarUtils.java:350)
at
org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeaderUnwrapped(TarArchiveEntry.java:1656)
at
org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1595)
at
org.apache.commons.compress.archivers.tar.TarArchiveEntry.<init>(TarArchiveEntry.java:556)
at
org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:379)
at com.synopsys.sigcompcore.Application.main(Application.java:37)
Caused by: java.lang.IllegalArgumentException: Invalid byte 97 at offset 0 in
'ame/longname' len=12
at
org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:153)
at
org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:183)
at
org.apache.commons.compress.archivers.tar.TarUtils.parseSparse(TarUtils.java:324)
at
org.apache.commons.compress.archivers.tar.TarUtils.readSparseStructs(TarUtils.java:339)
... 5 more{code}
Expected behavior: Log the IO Exception and exit(1.21 behavior) from corrupted
or truncated Tar after decompressing all available Tar entries (1.20 behavior).
> Corrupt Bz2 decompression fails to find all available entries
> -------------------------------------------------------------
>
> Key: COMPRESS-609
> URL: https://issues.apache.org/jira/browse/COMPRESS-609
> Project: Commons Compress
> Issue Type: Bug
> Affects Versions: 1.21
> Reporter: Madhu Gopanna
> Priority: Major
>
> Attached is a Bz2 Tar archive that on decompression does not include all
> available entries (contents) and exit with an IO Exception. This change in
> behavior maybe related to specific change log in 1.21 when compared to 1.20
> behavior for the same Tar.
> Bz2 Tar: Android /sample_images/sample_images.tar.bz2
> #
> ## Missing:
> ### disk_ext2_4k.img
> ### disk_ext2_4k_empty.img
> ### disk_ext2_unittest.img
> ## Not missing:
> ### disk_ext2_1k.img
> ## Exception:
> {code:java}
> java.io.IOException: Corrupted TAR archive.
> at
> org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1597)
> at
> org.apache.commons.compress.archivers.tar.TarArchiveEntry.<init>(TarArchiveEntry.java:556)
> at
> org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:379)
> at com.synopsys.sigcompcore.Application.main(Application.java:36)
> Caused by: java.lang.IllegalArgumentException: Invalid byte 38 at offset 0 in
> '& * ' len=8
> at
> org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:153)
> at
> org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:183)
> at
> org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseOctalOrBinary(TarArchiveEntry.java:1698)
> at
> org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeaderUnwrapped(TarArchiveEntry.java:1609)
> at
> org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1595)
> ... 3 more{code}
>
> Expected behavior: Log the IO Exception and exit(1.21 behavior) from
> corrupted Bz2 Tar after decompressing all available entries (1.20 behavior).
> #
--
This message was sent by Atlassian Jira
(v8.20.1#820001)