Commit 9832877e authored by Cheng Sun's avatar Cheng Sun Committed by Jean-Baptiste Kempf

Fix check for plugin table size

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 05a88d9f
......@@ -847,7 +847,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
err = NPERR_INCOMPATIBLE_VERSION_ERROR;
if (nsTable->size < ((char *)&nsTable->posturlnotify - (char *)nsTable))
err = NPERR_INVALID_FUNCTABLE_ERROR;
if (pluginFuncs->size < sizeof(NPPluginFuncs))
if (pluginFuncs->size < (char *)&pluginFuncs->setvalue - (char *)pluginFuncs)
err = NPERR_INVALID_FUNCTABLE_ERROR;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment