Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid LOC header (bad signature) #3

Closed
Mrucznik opened this issue Oct 24, 2018 · 2 comments
Closed

invalid LOC header (bad signature) #3

Mrucznik opened this issue Oct 24, 2018 · 2 comments

Comments

@Mrucznik
Copy link

Hello
When I run examples (Digest, Export or Information) on aff4 images created by tool: winpmem (https://github.com/Velocidex/c-aff4/releases) i get this error:

[ERROR] 00:04.393(Containers.java:getResourceID:136) invalid LOC header (bad signature)
java.util.zip.ZipException: invalid LOC header (bad signature)
at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:734)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.Reader.read(Reader.java:140)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2369)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2348)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:2325)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:2273)
at org.apache.commons.io.IOUtils.toString(IOUtils.java:1041)
at com.evimetry.aff4.Containers.getResourceID(Containers.java:132)
at com.evimetry.aff4.Containers.openContainer(Containers.java:91)
at com.evimetry.aff4.Containers.open(Containers.java:54)
at com.evimetry.aff4.examples.Information.main(Information.java:58)
[ERROR] 00:05.377(Information.java:main:95) org.apache.jena.atlas.RuntimeIOException: java.nio.channels.ClosedChannelException

Help!

@blschatz
Copy link
Member

I seem to recall that winpmem's zip implementation was generating invalid Zip64 location headers. The exception you are seeing is Java's ZIP implementation saying as much.

@scudette
Copy link
Member

I believe Java's implementation is wrong here. This should be fixed on the java side or it will be unable to read uncompressed segments in large files (>4Gb). Since Winpmem produces those for memory images it should be supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants