diff options
author | Tom Tromey <tromey@cygnus.com> | 2000-05-11 17:05:03 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2000-05-11 17:05:03 +0000 |
commit | 839ba6c89542c55178aef8012b7dbeda0eb3d4ef (patch) | |
tree | a3ccdf17e8fbb4128151af14f3914e7296ac8573 /libjava/java/util | |
parent | f19c9228fc48df0ca59f7f9b1ba8408f7c145153 (diff) | |
download | gcc-839ba6c89542c55178aef8012b7dbeda0eb3d4ef.zip gcc-839ba6c89542c55178aef8012b7dbeda0eb3d4ef.tar.gz gcc-839ba6c89542c55178aef8012b7dbeda0eb3d4ef.tar.bz2 |
ZipInputStream.java (getNextEntry): When reading file headers, don't include `size' in the skip call.
* java/util/zip/ZipInputStream.java (getNextEntry): When reading
file headers, don't include `size' in the skip call.
From-SVN: r33850
Diffstat (limited to 'libjava/java/util')
-rw-r--r-- | libjava/java/util/zip/ZipInputStream.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libjava/java/util/zip/ZipInputStream.java b/libjava/java/util/zip/ZipInputStream.java index df0ef03..492cf67 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(); |