changeset 2242:ead30a628023

Fix rhbz#560193 Process nested jars in applet code only if size > 0 bytes.
author Deepak Bhole <dbhole@redhat.com>
date Fri, 27 Aug 2010 13:59:35 -0400
parents 627620efacc8
children bf50b9b4cfa8
files ChangeLog netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java plugin/icedteanp/IcedTeaNPPlugin.cc
diffstat 3 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Aug 26 11:03:17 2010 +0200
+++ b/ChangeLog	Fri Aug 27 13:59:35 2010 -0400
@@ -1,3 +1,10 @@
+2010-08-27  Deepak Bhole <dbhole@redhat.com>
+
+	Fixes rhbz#560193
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+	(activateJars): Process nested jar only if size > 0 bytes.
+	* plugin/icedteanp/IcedTeaNPPlugin.cc: Fixed file name in header. 
+
 2010-08-16  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* Makefile.am:
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Thu Aug 26 11:03:17 2010 +0200
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Fri Aug 27 13:59:35 2010 -0400
@@ -638,13 +638,20 @@
 
                                     byte[] bytes = new byte[1024];
                                     int read = is.read(bytes);
+                                    int fileSize = read;
                                     while (read > 0) {
                                         extractedJar.write(bytes, 0, read);
                                         read = is.read(bytes);
+                                        fileSize += read;
                                     }
 
                                     is.close();
                                     extractedJar.close();
+                                    
+                                    // 0 byte file? skip
+                                    if (fileSize <= 0) {
+                                    	continue;
+                                    }
 
                                     JarSigner signer = new JarSigner();
                                     signer.verifyJar(extractedJarLocation);
--- a/plugin/icedteanp/IcedTeaNPPlugin.cc	Thu Aug 26 11:03:17 2010 +0200
+++ b/plugin/icedteanp/IcedTeaNPPlugin.cc	Fri Aug 27 13:59:35 2010 -0400
@@ -1,4 +1,4 @@
-/* IcedTeaPlugin.cc -- web browser plugin to execute Java applets
+/* IcedTeaNPPlugin.cc -- web browser plugin to execute Java applets
    Copyright (C) 2003, 2004, 2006, 2007  Free Software Foundation, Inc.
    Copyright (C) 2009, 2010 Red Hat