You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sven Kustos (JIRA)" <ji...@apache.org> on 2016/04/14 17:48:25 UTC
[jira] [Commented] (COMPRESS-351) Defective .zip-archive produces
problematic error message
[ https://issues.apache.org/jira/browse/COMPRESS-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15241386#comment-15241386 ]
Sven Kustos commented on COMPRESS-351:
--------------------------------------
{code:title=test.java|borderStyle=solid}
public static long getUnzippedFileSize(byte[] zippedData){
long byteSize = 0;
try(ZipArchiveInputStream zipArchiveInputStream = new ZipArchiveInputStream(new ByteArrayInputStream(zippedData))){
ArchiveEntry zipEntry = zipArchiveInputStream.getNextEntry();
while(zipEntry != null){
byteSize = byteSize + zipEntry.getSize();
zipEntry = zipArchiveInputStream.getNextEntry();
}
}
catch (IOException e) {
throw new RuntimeException(e);
}
return byteSize;
}
{code}
> Defective .zip-archive produces problematic error message
> ---------------------------------------------------------
>
> Key: COMPRESS-351
> URL: https://issues.apache.org/jira/browse/COMPRESS-351
> Project: Commons Compress
> Issue Type: Bug
> Components: Archivers
> Affects Versions: 1.11
> Environment: Production
> Reporter: Sven Kustos
> Attachments: DefectiveZipFileCausingBeeps.ZIP
>
>
> A truncated .zip-File produces an java.io.EOFException conatining a hughe amount of byte[]-data in the error-message - leading to beeps and crippeling workload in an potential console-logger.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)