[ 
https://issues.apache.org/jira/browse/COMPRESS-544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Lee resolved COMPRESS-544.
--------------------------------
    Fix Version/s: 1.21
         Assignee: Peter Lee
       Resolution: Fixed

> TarArchiveInputStream#getNextTarEntry does not fail on truncated archive
> ------------------------------------------------------------------------
>
>                 Key: COMPRESS-544
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-544
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Archivers
>    Affects Versions: 1.20
>            Reporter: Aditya Prasad
>            Assignee: Peter Lee
>            Priority: Minor
>             Fix For: 1.21
>
>         Attachments: test.tar, test_truncated.tar
>
>
> The following should throw IOException when given a truncated tar:
> {code:java}
> TarArchiveInputStream tarInput = new TarArchiveInputStream(inputStream);
> TarArchiveEntry currentEntry;
> while ((currentEntry = tarInput.getNextTarEntry()) != null) {
> }
> {code}
> Instead, it completes successfully. I've included a small simple .tar, and a 
> truncated version of it. Untaring from the command line fails properly:
> {code:java}
> $ tar -tf test_truncated.tar
> test/
> tar: Truncated tar archive
> tar: Error exit delayed from previous errors.{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to