commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Bodewig (JIRA)" <>
Subject [jira] [Commented] (COMPRESS-420) Entry missing from ZIP
Date Thu, 21 Sep 2017 06:17:04 GMT


Stefan Bodewig commented on COMPRESS-420:

$ zip -Tv ~/Downloads/ 
	zip warning: expected 3 entries but found 0

zip error: Zip file structure invalid (/home/stefan/Downloads/
$ java -jar target/commons-compress-1.15-SNAPSHOT.jar ~/Downloads/ 
Analysing /home/stefan/Downloads/

I see three entries with {{ZipArchiveInputStream}} (which is what {{Lister}} uses) but the
archive doesn't seem to be valid at all. At least that's what InfoZIP says.

When I use {{ZipFile}} of 1.14 (or the current git master) I get an {{EOFException}} at the
point where we start reading the central directory. It looks as if the offset inside the "end
of central directory header" was wrong. Looking at it with a hex editor I see the offset is
encoded as 0x11 0x48 0x02 0x00 which turns into 0x24811 or 149521 in decimal. Given the archive
is less than 70k in size this offset points outside of the archive, which also explains why
InfoZIP says it cannot find any entries.

So in short, your archive is corrupt, there is no regression in {{ZipFile}}. Has this archive
been created by Commons Compress?

> Entry missing from ZIP
> ----------------------
>                 Key: COMPRESS-420
>                 URL:
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Archivers
>    Affects Versions: 1.13, 1.14
>            Reporter: Luke Quinane
>         Attachments:
> There seems to be some regression introduced in v1.13 which means that the second entry
in the attached ZIP is no longer exposed via: '{{zipFile.getEntries();}}'.

This message was sent by Atlassian JIRA

View raw message