]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
JarFile.java (verifyHashes): Check whether ZipEntry exists.
authorMark Wielaard <mark@klomp.org>
Mon, 21 Feb 2005 20:29:00 +0000 (20:29 +0000)
committerMark Wielaard <mark@gcc.gnu.org>
Mon, 21 Feb 2005 20:29:00 +0000 (20:29 +0000)
       * java/util/jar/JarFile.java (verifyHashes): Check whether ZipEntry
       exists.

From-SVN: r95347

libjava/ChangeLog
libjava/java/util/jar/JarFile.java

index 7d869d5a2b21aafa5ed22cecf0fdd7734c386c87..1c141df39057b2326091432dab1ae8e0a0425d9c 100644 (file)
@@ -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.
index c66881f1900c2d2d8868215d92e49f051b1bc620..cb2cbf4900c13ab173fe92690f2635c0321273f7 100644 (file)
@@ -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)
       {