aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Bhole <[email protected]>2012-01-09 18:45:31 -0500
committerDeepak Bhole <[email protected]>2012-01-09 18:45:31 -0500
commit36bd792b00d8402ba2c71e17e6374a6c221b5ca2 (patch)
treeef4a19a386d99b20591b152bea25ccb8e398becf
parent12ea54672f72e38a5913377bf07f50cb14f51a18 (diff)
PR838: IcedTea plugin crashes with chrome browser when javascript is executedicedtea-web-1.2-branchpoint
-rw-r--r--ChangeLog7
-rw-r--r--NEWS1
-rw-r--r--plugin/icedteanp/IcedTeaPluginRequestProcessor.cc8
3 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a8514ef..6c5c012 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-01-09 Deepak Bhole <[email protected]>
+
+ PR838: IcedTea plugin crashes with chrome browser when javascript is executed
+ * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc (eval): Added a check
+ to ensure that the result pointer is valid before attempting to create an
+ NPVariant from it.
+
2012-01-05 Omair Majid <[email protected]>
* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
diff --git a/NEWS b/NEWS
index 3d0ca94..42fe1da 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,7 @@ New in release 1.2 (2011-XX-XX):
* Plugin
- PR749: sun.applet.PluginStreamHandler#handleMessage(String) really slow
- PR782: Support building against npapi-sdk as well
+ - PR838: IcedTea plugin crashes with chrome browser when javascript is executed
- RH586194: Unable to connect to connect with Juniper VPN client
- RH718693: MindTerm SSH Applet doesn't work
Common
diff --git a/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc b/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
index a5937d2..77d5356 100644
--- a/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
+++ b/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
@@ -243,7 +243,13 @@ PluginRequestProcessor::eval(std::vector<std::string*>* message_parts)
NPVariant* result_variant = (NPVariant*) IcedTeaPluginUtilities::stringToJSID(thread_data.result);
std::string result_variant_jniid = std::string();
- createJavaObjectFromVariant(instance, *result_variant, &result_variant_jniid);
+ if (result_variant)
+ {
+ createJavaObjectFromVariant(instance, *result_variant, &result_variant_jniid);
+ } else
+ {
+ result_variant_jniid = "0";
+ }
IcedTeaPluginUtilities::constructMessagePrefix(0, reference, &response);
response += " JavaScriptEval ";