You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Peter Lee (Jira)" <ji...@apache.org> on 2020/08/24 09:21:00 UTC

[jira] [Resolved] (COMPRESS-546) Decompression fails with NullPointerException

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

Peter Lee resolved COMPRESS-546.
--------------------------------
    Resolution: Fixed

> Decompression fails with NullPointerException
> ---------------------------------------------
>
>                 Key: COMPRESS-546
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-546
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.20
>            Reporter: Maksim Zuev
>            Priority: Major
>         Attachments: NullPointerException.zip
>
>
> This Kotlin code fails with exception(NullPointerException.zip is in the attachments)
> Exception in thread "main" java.lang.NullPointerExceptionException in thread "main" java.lang.NullPointerException at org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.processZip64Extra(ZipArchiveInputStream.java:424) at org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextZipEntry(ZipArchiveInputStream.java:347) at org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextEntry(ZipArchiveInputStream.java:435) at kotlinx.fuzzer.tests.apache.zip.ApacheZipTestKt.main(ApacheZipTest.kt:85) at kotlinx.fuzzer.tests.apache.zip.ApacheZipTestKt.main(ApacheZipTest.kt)
> {code:java}
> import org.apache.commons.compress.archivers.ArchiveStreamFactory
> import java.io.ByteArrayInputStream
> import java.io.File
> fun main() {
>     val bytes = File("NullPointerException.zip").readBytes()
>     val input = ByteArrayInputStream(bytes)
>     ArchiveStreamFactory().createArchiveInputStream("zip", input).use { ais ->
>         ais.nextEntry
>         ais.readAllBytes()
>     }
> }
> {code}
> Expected some other exception as IOException is the only declared.
>  



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