[rfc][icedtea-web] (C++) More precise check of browser table and plugin table callback structures in NP_Initialize
Adam Domurad
adomurad at redhat.com
Tue Jun 19 07:23:06 PDT 2012
I have checked now. I don't know how the results differ for others but -
all plugin's except firefox do not work BEFORE the patch, and work with
the patch, although Epiphany does not seem to pass
http://www.java.com/en/download/testjava.jsp
On Tue, 2012-06-19 at 15:30 +0200, Jiri Vanek wrote:
> On 06/18/2012 06:12 PM, Adam Domurad wrote:
> > 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.
>
> Just note - please ensure you wil lnot break opera chromium, firefox, midori, epiphany or whatever
> browser by this new table.
> J.
More information about the distro-pkg-dev
mailing list