You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Stefan Bodewig (Jira)" <ji...@apache.org> on 2020/05/31 11:39:00 UTC

[jira] [Resolved] (COMPRESS-531) Tar decompression fails with NullPointerException

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

Stefan Bodewig resolved COMPRESS-531.
-------------------------------------
    Fix Version/s: 1.21
       Resolution: Fixed

> Tar decompression fails with NullPointerException
> -------------------------------------------------
>
>                 Key: COMPRESS-531
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-531
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.20
>            Reporter: Maksim Zuev
>            Priority: Major
>             Fix For: 1.21
>
>         Attachments: NPE.tar
>
>
> This Kotlin code fails with exception(NPE.tar is in the attachment)
> Exception in thread "main" java.lang.NullPointerException
>  at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.applyPaxHeadersToCurrentEntry(TarArchiveInputStream.java:757)
>  at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.paxHeaders(TarArchiveInputStream.java:562)
>  at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:404)
>  at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextEntry(TarArchiveInputStream.java:799)
>  at ru.example.kotlinfuzzer.tests.MainKt.main(main.kt:20)
>  at ru.example.kotlinfuzzer.tests.MainKt.main(main.kt)
> {code:java}
> import org.apache.commons.compress.archivers.ArchiveStreamFactory
> import java.io.File
> fun main() {
>     val tar = File("NPE.tar")
>     ArchiveStreamFactory().createArchiveInputStream("tar", tar.inputStream()).use { ais ->
>         ais.nextEntry
>         ais.readAllBytes()
>     }
> }
> {code}
> IOException expected



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