Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.20
-
None
-
None
Description
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)
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() } }
IOException expected