You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-java/icedtea-web/files/icedtea-web-1.2.1-memcpy.patch

15 lines
645 B

--- plugin/icedteanp/IcedTeaNPPlugin.cc.orig 2012-08-03 21:54:01.462412006 +0200
+++ plugin/icedteanp/IcedTeaNPPlugin.cc 2012-08-03 21:54:45.760139442 +0200
@@ -2053,8 +2053,10 @@
//Ensure any unused fields are NULL
memset(&browser_functions, 0, sizeof(NPNetscapeFuncs));
+ //browserTable->size can be higher than our structure (bug #1106)
+ 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;
}