aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e439276..e6298ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-28 Adam Domurad <[email protected]>
+
+ * plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java
+ (handleMessage): Fix potential NPE on 'GetValue'
+
2013-06-25 Jiri Vanek <[email protected]>
* acinclude.m4: (IT_CHECK_FOR_TAGSOUP) is now correctly setting
diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java b/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java
index 697833d..cef0ac9 100644
--- a/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java
+++ b/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java
@@ -522,8 +522,9 @@ public class PluginAppletSecurityContext {
Integer index = parseCall(args[1], null, Integer.class);
Object ret = store.getObject(index);
+ Class<?> retClass = ret != null ? ret.getClass() : null;
- String objIDStr = toObjectIDString(ret, ret.getClass(), true /*unbox primitives*/);
+ String objIDStr = toObjectIDString(ret, retClass, true /*unbox primitives*/);
write(reference, "GetValue " + objIDStr);
} else if (message.startsWith("SetStaticField") ||
message.startsWith("SetField")) {