blob: e75dfe0c9192655401d16b592df64b0fb21a5225 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
--- gecko-mediaplayer-1.0.8/src/np_entry.cpp.orig 2012-08-04 19:18:47.000000000 +0200
+++ gecko-mediaplayer-1.0.8/src/np_entry.cpp 2013-11-21 22:09:51.445221214 +0100
@@ -52,6 +52,7 @@
#endif
NPNetscapeFuncs NPNFuncs;
+#include <stddef.h>
#ifdef XP_WIN
@@ -117,9 +118,23 @@
if (HIBYTE(pFuncs->version) > NP_VERSION_MAJOR)
return NPERR_INCOMPATIBLE_VERSION_ERROR;
- if (pFuncs->size < sizeof(NPNetscapeFuncs))
+ // if (pFuncs->size < sizeof(NPNetscapeFuncs))
+ // Updated from Issue #184
+ // using model from http://sources.debian.net/src/iceweasel/21.0-1/dom/plugins/test/testplugin/nptest.cpp#L672
+ if (pFuncs->size < (offsetof(NPNetscapeFuncs, setexception) + sizeof(void *)))
return NPERR_INVALID_FUNCTABLE_ERROR;
+#ifdef XP_UNIX
+#ifdef OIJ
+ if (pFuncs->size < (offsetof(NPPluginFuncs, javaClass) + sizeof(void *)))
+ return NPERR_INVALID_FUNCTABLE_ERROR;
+#else
+ if (pFuncs->size < (offsetof(NPPluginFuncs, getvalue) + sizeof(void *)))
+ return NPERR_INVALID_FUNCTABLE_ERROR;
+#endif
+#endif
+
+
NPNFuncs.size = pFuncs->size;
NPNFuncs.version = pFuncs->version;
NPNFuncs.geturlnotify = pFuncs->geturlnotify;
@@ -198,3 +213,4 @@
{
return NPERR_NO_ERROR;
}
+
|