diff options
author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-21 20:29:00 +0000 |
---|---|---|
committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-21 20:29:00 +0000 |
commit | 8161f7fbd980f4d3b2d8d15e82a838782ade1686 (patch) | |
tree | fa2b39873490c8be57ac3c2968f03ad9016fd74a | |
parent | 5b7bf9b959297dbd4e335edd8e9446cc46c762cd (diff) | |
download | gcc-8161f7fbd980f4d3b2d8d15e82a838782ade1686.tar.gz |
* java/util/jar/JarFile.java (verifyHashes): Check whether ZipEntry
exists.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95347 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/util/jar/JarFile.java | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 7d869d5a2b2..1c141df3905 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2005-02-21 Mark Wielaard <mark@klomp.org> + + * java/util/jar/JarFile.java (verifyHashes): Check whether ZipEntry + exists. + 2005-02-21 Andrew Haley <aph@redhat.com> * Makefile.in: Rebuilt. diff --git a/libjava/java/util/jar/JarFile.java b/libjava/java/util/jar/JarFile.java index c66881f1900..cb2cbf4900c 100644 --- a/libjava/java/util/jar/JarFile.java +++ b/libjava/java/util/jar/JarFile.java @@ -726,7 +726,14 @@ public class JarFile extends ZipFile byte[] entryBytes = null; try { - entryBytes = readManifestEntry(super.getEntry(entry)); + ZipEntry e = super.getEntry(entry); + if (e == null) + { + if (DEBUG) + debug("verifyHashes: no entry '" + entry + "'"); + return false; + } + entryBytes = readManifestEntry(e); } catch (IOException ioe) { |