changeset in /hg/icedtea6: - Fix address pointer integer overflo...

Deepak Bhole dbhole at redhat.com
Mon Oct 27 12:25:52 PDT 2008


changeset 1eb6a720a6be in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1eb6a720a6be
description:
	- Fix address pointer integer overflow on 64-bit systems.
	- Set cache dir to be local to each user (~/.icedteaplugin/cache).
	- Apply patch from Tom Fitzsimmons for Bug# 230.

diffstat:

4 files changed, 20 insertions(+), 13 deletions(-)
ChangeLog                                                  |    9 +++++++++
IcedTeaPlugin.cc                                           |    8 ++++----
plugin/icedtea/sun/applet/PluginAppletSecurityContext.java |   12 ++++++------
plugin/icedtea/sun/applet/PluginAppletViewer.java          |    4 +---

diffs (116 lines):

diff -r fda32eba4b37 -r 1eb6a720a6be ChangeLog
--- a/ChangeLog	Mon Oct 27 15:52:37 2008 +0100
+++ b/ChangeLog	Mon Oct 27 12:13:21 2008 -0400
@@ -1,3 +1,12 @@ 2008-10-27  Mark Wielaard  <mark at klomp.o
+2008-10-27  Deepak Bhole  <dbhole at redhat.com>
+
+	* IcedTeaPlugin.cc: Fix address pointer integer overflow on 64-bit
+	systems.
+	* plugin/icedtea/sun/applet/PluginAppletSecurityContext.java: Set cache
+	dir to be local to each user (~/.icedteaplugin/cache).
+	* plugin/icedtea/sun/applet/PluginAppletViewer.java: Apply patch from Tom
+	Fitzsimmons for Bug# 230.
+
 2008-10-27  Mark Wielaard  <mark at klomp.org>
 
 	* patches/icedtea-renderer-crossing.patch: New patch.
diff -r fda32eba4b37 -r 1eb6a720a6be IcedTeaPlugin.cc
--- a/IcedTeaPlugin.cc	Mon Oct 27 15:52:37 2008 +0100
+++ b/IcedTeaPlugin.cc	Mon Oct 27 12:13:21 2008 -0400
@@ -448,7 +448,7 @@ char const* TYPES[10] = { "Object",
 
 #define MESSAGE_ADD_SIZE(size)                  \
   message += " ";                               \
-  message.AppendInt (size);
+  message.AppendInt ((PRUintn) size);
 
 // Pass character value through socket as an integer.
 #define MESSAGE_ADD_TYPE(type)                  \
@@ -3888,7 +3888,7 @@ IcedTeaPluginInstance::GetWindow ()
   message += " ";
   message += "JavaScriptGetWindow";
   message += " ";
-  message.AppendInt (liveconnect_window);
+  message.AppendInt ((PRUintn) liveconnect_window);
   factory->SendMessageToAppletViewer (message);
 }
 
@@ -4606,7 +4606,7 @@ IcedTeaJNIEnv::ValueString (jni_type typ
       retstr.AppendInt (value.i);
       break;
     case jlong_type:
-      retstr.AppendInt (value.j);
+      retstr.AppendInt ((PRUintn) value.j);
       break;
     case jfloat_type:
       retstr += IcedTeaPrintfCString ("%f", value.f);
@@ -4735,7 +4735,7 @@ IcedTeaJNIEnv::ExpandArgs (JNIID* id, jv
           retstr.AppendInt (args[arg].i);
           break;
         case 'J':
-          retstr.AppendInt (args[arg].j);
+          retstr.AppendInt ((PRUintn) args[arg].j);
           break;
         case 'F':
           retstr += IcedTeaPrintfCString ("%f", args[arg].f);
diff -r fda32eba4b37 -r 1eb6a720a6be plugin/icedtea/sun/applet/PluginAppletSecurityContext.java
--- a/plugin/icedtea/sun/applet/PluginAppletSecurityContext.java	Mon Oct 27 15:52:37 2008 +0100
+++ b/plugin/icedtea/sun/applet/PluginAppletSecurityContext.java	Mon Oct 27 12:13:21 2008 -0400
@@ -37,14 +37,12 @@ exception statement from your version. *
 
 package sun.applet;
 
-import java.awt.AWTPermission;
-import java.io.FilePermission;
+import java.io.File;
 import java.lang.reflect.Array;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.net.MalformedURLException;
-import java.net.SocketPermission;
 import java.net.URL;
 import java.security.AccessControlContext;
 import java.security.AccessControlException;
@@ -52,15 +50,12 @@ import java.security.AllPermission;
 import java.security.AllPermission;
 import java.security.BasicPermission;
 import java.security.CodeSource;
-import java.security.PermissionCollection;
 import java.security.Permissions;
-import java.security.Policy;
 import java.security.PrivilegedAction;
 import java.security.ProtectionDomain;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
-import java.util.PropertyPermission;
 
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
 
@@ -244,6 +239,11 @@ public class PluginAppletSecurityContext
 	public PluginAppletSecurityContext(int identifier) {
 		this.identifier = identifier;
 		
+		// also, override the basedir, use a different one for the plugin
+		File f = new File(System.getProperty("user.home") + "/.icedteaplugin/");
+		f.mkdir();
+		JNLPRuntime.setBaseDir(f);
+
 		// We need a security manager.. and since there is a good chance that 
 		// an applet will be loaded at some point, we should make it the SM 
 		// that JNLPRuntime will try to install
diff -r fda32eba4b37 -r 1eb6a720a6be plugin/icedtea/sun/applet/PluginAppletViewer.java
--- a/plugin/icedtea/sun/applet/PluginAppletViewer.java	Mon Oct 27 15:52:37 2008 +0100
+++ b/plugin/icedtea/sun/applet/PluginAppletViewer.java	Mon Oct 27 12:13:21 2008 -0400
@@ -1266,9 +1266,7 @@ import sun.misc.Ref;
  		val = buf.toString();
  	    }
  	    PluginDebug.debug("PUT " + att + " = '" + val + "'");
- 	    if (! val.equals("")) {
- 		atts.put(att.toLowerCase(java.util.Locale.ENGLISH), val);
- 	    }
+ 	    atts.put(att.toLowerCase(java.util.Locale.ENGLISH), val);
              while (true) {
                  if ((c == '>') || (c < 0) ||
                      ((c >= 'a') && (c <= 'z')) ||



More information about the distro-pkg-dev mailing list