[jira] [Commented] (COMPRESS-463) ZipArchiveInputStream should throw if stored entry ends prematurely
[ https://issues.apache.org/jira/browse/COMPRESS-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17163635#comment-17163635 ] Stefan Bodewig commented on COMPRESS-463: - With Compress 1.7 the implementation for reading stored entries has changed and introduced a flaky behavior where {{read}} would alternate between -1 and a non-negative number returned which can throw {{InputStreamReader}} into an infinite loop. Compress 1.6 and earlier would have returned -1 consistently and thus not cause an infinite loop - but it would also not properly signal the archive as corrupted and give you the false impression you'd have read the entry completely. > ZipArchiveInputStream should throw if stored entry ends prematurely > --- > > Key: COMPRESS-463 > URL: https://issues.apache.org/jira/browse/COMPRESS-463 > Project: Commons Compress > Issue Type: Bug > Components: Archivers >Affects Versions: 1.17 >Reporter: Stefan Bodewig >Priority: Major > Labels: zip > Fix For: 1.18 > > > If the archive stream ends before the claimed size of a stored entry has been > hit the stream returns -1 rather than throwing a "truncated archive" > exception like it would do for deflated entries. > Because of this it is impossible to detect a truncated stored entry. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (COMPRESS-463) ZipArchiveInputStream should throw if stored entry ends prematurely
[ https://issues.apache.org/jira/browse/COMPRESS-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17163559#comment-17163559 ] Lucas Sasha commented on COMPRESS-463: -- [~bodewig] Hi, I reached out to this Bug Id, can you please provide more details regarding the versions before 1.17? I saw your email thread here: [https://lists.apache.org/thread.html/b8da751fc0ca949534cdf2744111da6bb0349d2798fac94b0a50f330@%3Cannounce.apache.org%3E] Do the version before 1.7 are affected as well? Thanks in advance! > ZipArchiveInputStream should throw if stored entry ends prematurely > --- > > Key: COMPRESS-463 > URL: https://issues.apache.org/jira/browse/COMPRESS-463 > Project: Commons Compress > Issue Type: Bug > Components: Archivers >Affects Versions: 1.17 >Reporter: Stefan Bodewig >Priority: Major > Labels: zip > Fix For: 1.18 > > > If the archive stream ends before the claimed size of a stored entry has been > hit the stream returns -1 rather than throwing a "truncated archive" > exception like it would do for deflated entries. > Because of this it is impossible to detect a truncated stored entry. -- This message was sent by Atlassian Jira (v8.3.4#803005)