From issues-return-91916-archive-asf-public=cust-asf.ponee.io@commons.apache.org Tue Sep 1 18:18:02 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id BF533180660 for ; Tue, 1 Sep 2020 20:18:02 +0200 (CEST) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id EF406123C9F for ; Tue, 1 Sep 2020 18:18:01 +0000 (UTC) Received: (qmail 96722 invoked by uid 500); 1 Sep 2020 18:18:01 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 96692 invoked by uid 99); 1 Sep 2020 18:18:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2020 18:18:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C35E245C34 for ; Tue, 1 Sep 2020 18:18:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 1EBB87805A7 for ; Tue, 1 Sep 2020 18:18:00 +0000 (UTC) Date: Tue, 1 Sep 2020 18:18:00 +0000 (UTC) From: "Maksim Zuev (Jira)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (COMPRESS-554) Tar decompression fails with NullPointerException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COMPRESS-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17188718#comment-17188718 ] Maksim Zuev commented on COMPRESS-554: -------------------------------------- Compress became the most convenient project for testing and developing my [fuzzer project|https://github.com/zuevmaxim/kotlin-fuzzer]. It is WIP now, but will be released in the nearest future. > Tar decompression fails with NullPointerException > ------------------------------------------------- > > Key: COMPRESS-554 > URL: https://issues.apache.org/jira/browse/COMPRESS-554 > Project: Commons Compress > Issue Type: Bug > Affects Versions: 1.20, 1.21 > Reporter: Maksim Zuev > Priority: Major > Attachments: NPE.tar > > > This Kotlin code fails with exception(NPE.tar is in the attachments) > Exception in thread "main" java.lang.NullPointerExceptionException in thread "main" java.lang.NullPointerException at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:424) at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextEntry(TarArchiveInputStream.java:858) at kotlinx.fuzzer.tests.apache.tar.ApacheTarTestKt.main(ApacheTarTest.kt:79) at kotlinx.fuzzer.tests.apache.tar.ApacheTarTestKt.main(ApacheTarTest.kt) > {code:java} > import org.apache.commons.compress.archivers.ArchiveStreamFactory > import org.apache.commons.compress.archivers.tar.TarArchiveEntry > import java.io.File > import java.io.FileInputStream > fun main() { > FileInputStream(File("NPE.tar")).use { fis -> > ArchiveStreamFactory().createArchiveInputStream("tar", fis).use { ais -> > var zae = ais.nextEntry as TarArchiveEntry? > while (zae != null) { > ais.readAllBytes() > zae = ais.nextEntry as TarArchiveEntry? > } > } > } > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)