Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C3081116EC for ; Fri, 25 Apr 2014 12:07:34 +0000 (UTC) Received: (qmail 40214 invoked by uid 500); 25 Apr 2014 12:07:22 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 39914 invoked by uid 500); 25 Apr 2014 12:07:17 -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 39884 invoked by uid 99); 25 Apr 2014 12:07:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Apr 2014 12:07:16 +0000 Date: Fri, 25 Apr 2014 12:07:15 +0000 (UTC) From: "BELUGA BEHR (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (COMPRESS-279) TarArchiveInputStream silently finished when unexpected EOF occured 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-279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13980933#comment-13980933 ] BELUGA BEHR commented on COMPRESS-279: -------------------------------------- It was probably in the TarBuffer class that I lopped out. > TarArchiveInputStream silently finished when unexpected EOF occured > ------------------------------------------------------------------- > > Key: COMPRESS-279 > URL: https://issues.apache.org/jira/browse/COMPRESS-279 > Project: Commons Compress > Issue Type: Bug > Components: Archivers > Affects Versions: 1.7, 1.8 > Environment: Common Compress 1.7 + openJDK 1.7 > Reporter: PeterL in > Labels: regression, tar > Fix For: 1.9 > > Attachments: TarArchiveInputStream.java.patch, complete.tar, trim.tar, trim.tar.bz2 > > > I just found the following test case didn't raise an IOException as it used to be for a *tar trimmed on purpose* > @Test > public void testCorruptedBzip2() throws IOException { > String archivePath = PathUtil.join(testdataDir, "test.tar.bz2"); > TarArchiveInputStream input = null; > input = new TarArchiveInputStream(new BZip2CompressorInputStream( > GoogleFile.SYSTEM.newInputStream(archivePath), true)); > ArchiveEntry nextMatchedEntry = input.getNextEntry(); > while (nextMatchedEntry != null) { > logger.infofmt("Extracting %s", nextMatchedEntry.getName()); > String outputPath = PathUtil.join("/tmp/", nextMatchedEntry.getName()); > OutputStream out = new FileOutputStream(outputPath); > ByteStreams.copy(input, out); > out.close(); > nextMatchedEntry = input.getNextEntry(); > } > } -- This message was sent by Atlassian JIRA (v6.2#6252)