[vlc-devel] [PATCH 1/4] Fix check for plugin table size

Rafaël Carré funman at videolan.org
Sun Dec 30 23:59:18 CET 2012


Le 30/12/2012 21:51, Cheng Sun a écrit :
> ---
>  npapi/support/npunix.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/npapi/support/npunix.cpp b/npapi/support/npunix.cpp
> index 0f4baaf..1f3f778 100644
> --- a/npapi/support/npunix.cpp
> +++ b/npapi/support/npunix.cpp
> @@ -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;
>      }

What does it fix exactly?



More information about the vlc-devel mailing list