summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-11 17:05:03 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-11 17:05:03 +0000
commitaff984dec74f5b5ac8e375c9860de01bd4ff26b3 (patch)
treea3ccdf17e8fbb4128151af14f3914e7296ac8573
parent98b4572e5fc3ef26ed6cbfe33967cdfd0538de29 (diff)
downloadppe42-gcc-aff984dec74f5b5ac8e375c9860de01bd4ff26b3.tar.gz
ppe42-gcc-aff984dec74f5b5ac8e375c9860de01bd4ff26b3.zip
* java/util/zip/ZipInputStream.java (getNextEntry): When reading
file headers, don't include `size' in the skip call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33850 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/java/util/zip/ZipInputStream.java10
2 files changed, 13 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 00330e0d940..11172673221 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-11 Tom Tromey <tromey@cygnus.com>
+
+ * java/util/zip/ZipInputStream.java (getNextEntry): When reading
+ file headers, don't include `size' in the skip call.
+
2000-05-10 Bryce McKinlay <bryce@albatross.co.nz>
* java/lang/StringBuffer.java (delete): Call arrayCopy() correctly.
diff --git a/libjava/java/util/zip/ZipInputStream.java b/libjava/java/util/zip/ZipInputStream.java
index df0ef03d588..492cf67c733 100644
--- a/libjava/java/util/zip/ZipInputStream.java
+++ b/libjava/java/util/zip/ZipInputStream.java
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation
+/* Copyright (C) 1999, 2000 Free Software Foundation
This file is part of libgcj.
@@ -52,7 +52,13 @@ public class ZipInputStream extends InflaterInputStream implements ZipConstants
int fname_length = readu2();
int extra_length = readu2();
int fcomment_length = readu2();
- in.skip(12+fname_length+extra_length+fcomment_length+size);
+ // `12' is the number of bytes between the comment length
+ // field and the end of the fixed part of the header:
+ // 2 bytes for `disk number start'
+ // 2 bytes for `internal file attributes'
+ // 4 bytes for `external file attributes'
+ // 4 bytes for `relative offset of local header'
+ in.skip(12 + fname_length + extra_length + fcomment_length);
if (in.read() != 'P' || in.read() != 'K')
return null;
code = in.read();
OpenPOWER on IntegriCloud