diff options
author | Thomas Meyer <[email protected]> | 2012-08-07 23:06:03 +0200 |
---|---|---|
committer | Thomas Meyer <[email protected]> | 2012-08-07 23:06:03 +0200 |
commit | 008a845efd9e3328c30878c49666e761ec512254 (patch) | |
tree | 45ad34bca648a5af55b479cc8bab33a2644ac3ad /plugin/icedteanp/IcedTeaNPPlugin.cc | |
parent | 3b6a04f1bf8a4732380dc68c2119496564d240da (diff) | |
parent | 6342e7fd17bf9813acd343a9f17c378f77e4ea0f (diff) |
Merge branches
Diffstat (limited to 'plugin/icedteanp/IcedTeaNPPlugin.cc')
-rw-r--r-- | plugin/icedteanp/IcedTeaNPPlugin.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugin/icedteanp/IcedTeaNPPlugin.cc b/plugin/icedteanp/IcedTeaNPPlugin.cc index d8b8948..1012812 100644 --- a/plugin/icedteanp/IcedTeaNPPlugin.cc +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc @@ -2043,8 +2043,13 @@ initialize_browser_functions(const NPNetscapeFuncs* browserTable) //Ensure any unused fields are NULL memset(&browser_functions, 0, sizeof(NPNetscapeFuncs)); + + //browserTable->size can be larger than sizeof(NPNetscapeFuncs) (PR1106) + size_t copySize = browserTable->size < sizeof(NPNetscapeFuncs) ? + browserTable->size : sizeof(NPNetscapeFuncs); + //Copy fields according to given size - memcpy(&browser_functions, browserTable, browserTable->size); + memcpy(&browser_functions, browserTable, copySize); return true; } |