]> git.saurik.com Git - backport.git/commitdiff
I accidentally verified the field little-endian. v0.9.5
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 2 Nov 2013 01:22:57 +0000 (18:22 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 2 Nov 2013 01:22:57 +0000 (18:22 -0700)
src/com/saurik/backport/Hook.java

index 292ba61a514dc041197a1afea16c6ab45bcec1ea..2c54395fbeebadfac85250c7e7464229491f1180 100644 (file)
@@ -141,7 +141,7 @@ public class Hook {
 
                         raf.skipBytes(18);
 
-                        int length = raf.readShort() & 0xffff;
+                        int length = Short.reverseBytes(raf.readShort()) & 0xffff;
                         if (length != ZipEntry$nameLen.getInt(entry))
                             throw new ZipException("bug #9950697 [" + thiz.getName() + "]");