[rfc][icedtea-web] (C++) More precise check of browser table and plugin table callback structures in NP_Initialize
Adam Domurad
adomurad at redhat.com
Mon Jun 18 09:12:09 PDT 2012
Hey all. This is motivated by the recent version of Google Chrome
erroring and not running the plugin, giving 'Invalid plugin table.' I
was speaking with Deepak on ways to solve this issue and came up with
this solution.
The previous code checked the size of NPPluginFunc's (as well as
NPNetscapeFunc's) against the size reported by the browser. This code
merely requires the browser to pass a copy of these structures big
enough to support the functions we actually use.
The previous code could in theory write past the end of an object as
well, as it only warned if NPPluginFunc was not big enough.
The code now always errors if functionality we need is not provided.
Changelog:
2012-06-18 Adam Domurad <adomurad at redhat.com>
Allow passing of plugin tables and browser tables in NP_Initialize that
are not the expected length but still large enough for our purposes.
* plugin/icedteanp/IcedTeaNPPlugin.cc
(initialize_browser_functions): New function to check size of passed
browser function table, and initialize 'browser_functions' global
variable.
(initialize_plugin_table): New function to check size of passed
plugin function table, and initialize proper plugin callbacks.
(NP_Initialize): Make use of initialization helper functions, get
rid of old size tests and error if the helper functions fail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lenient-startup.patch
Type: text/x-patch
Size: 9750 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120618/3e8eae58/lenient-startup.patch
More information about the distro-pkg-dev
mailing list