Mercurial > hg > release > icedtea6-1.7
changeset 1980:e508d944ca9d
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 14:46:25 -0400 |
parents | c18673769bc8 |
children | b24b8735bb51 0b63ff75d44a |
files | ChangeLog NEWS rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java |
diffstat | 3 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Aug 25 17:11:27 2010 +0100 +++ b/ChangeLog Fri Aug 27 14:46:25 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. + * NEWS: Updated. + 2010-07-30 Andrew John Hughes <ahughes@redhat.com> * Makefile.am: Add patch below.
--- a/NEWS Wed Aug 25 17:11:27 2010 +0100 +++ b/NEWS Fri Aug 27 14:46:25 2010 -0400 @@ -9,6 +9,8 @@ - Run programs that inherit main(String[]) in their main-class - Work with JNLP files that use spec version 1.6 - RH601281: Possible NullPointerException in splash screen code +* Plugin + - RH560193: Fix ziperror when applet jar contained another 0-byte jar New in release 1.7.4 (2010-07-28):
--- a/rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed Aug 25 17:11:27 2010 +0100 +++ b/rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Fri Aug 27 14:46:25 2010 -0400 @@ -639,13 +639,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);