Mercurial > hg > release > icedtea-web-1.1
changeset 213:0d1874f9e7ff
Fixed RH691259: Midori sends a SIGSEGV with the IcedTea NP Plugin
author | Deepak Bhole <dbhole@redhat.com> |
---|---|
date | Mon, 18 Apr 2011 11:36:52 -0400 |
parents | b4db997469a2 |
children | bdb72bab9e9c |
files | ChangeLog plugin/icedteanp/IcedTeaNPPlugin.cc |
diffstat | 2 files changed, 19 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Apr 14 21:41:32 2011 +0100 +++ b/ChangeLog Mon Apr 18 11:36:52 2011 -0400 @@ -1,3 +1,10 @@ +2011-04-18 Deepak Bhole <dbhole@redhat.com> + + RH691259: Midori sends a SIGSEGV with the IcedTea NP Plugin + * plugin/icedteanp/IcedTeaNPPlugin.cc (NP_Initialize): Rather than + returning immediately if already initialized, return after function tables + are reset. + 2010-04-11 Andrew John Hughes <ahughes@redhat.com> * configure.ac:
--- a/plugin/icedteanp/IcedTeaNPPlugin.cc Thu Apr 14 21:41:32 2011 +0100 +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Mon Apr 18 11:36:52 2011 -0400 @@ -2009,14 +2009,12 @@ { PLUGIN_DEBUG ("NP_Initialize\n"); - if (initialized) - return NPERR_NO_ERROR; - else if ((browserTable == NULL) || (pluginTable == NULL)) - { - PLUGIN_ERROR ("Browser or plugin function table is NULL."); - - return NPERR_INVALID_FUNCTABLE_ERROR; - } + if ((browserTable == NULL) || (pluginTable == NULL)) + { + PLUGIN_ERROR ("Browser or plugin function table is NULL."); + + return NPERR_INVALID_FUNCTABLE_ERROR; + } // Ensure that the major version of the plugin API that the browser // expects is not more recent than the major version of the API that @@ -2123,6 +2121,12 @@ pluginTable->getvalue = NPP_GetValueProcPtr (ITNP_GetValue); #endif + // Re-setting the above tables multiple times is OK (as the + // browser may change its function locations). However + // anything beyond this point should only run once. + if (initialized) + return NPERR_NO_ERROR; + // Make sure the plugin data directory exists, creating it if // necessary. data_directory = g_strconcat (P_tmpdir, NULL);