[FFmpeg-devel] [PATCH] errant pointer check in vhook/ppm.c

Måns Rullgård mans
Thu Jul 17 22:17:46 CEST 2008


Erik Hovland <erik at hovland.org> writes:

> I recognize that the vhook stuff is deprecated. But since it still gets
> compiled in trunk I figured I would submit this fix.
>
> The function Configure in vhook/ppm.c checks the given pointer and not
> the allocated pointer because of a minor typo.
>
> ---
>
>  vhook/ppm.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/vhook/ppm.c b/vhook/ppm.c
> index 6ebfe47..d9986c8 100644
> --- a/vhook/ppm.c
> +++ b/vhook/ppm.c
> @@ -211,7 +211,7 @@ int Configure(void **ctxp, int argc, char *argv[])
>      if ( argc > 1 )
>      {
>          *ctxp = av_mallocz(sizeof(ContextInfo));
> -        if ( ctxp != NULL && argc > 1 )
> +        if ( *ctxp != NULL && argc > 1 )
>          {
>              ContextInfo *info = (ContextInfo *)*ctxp;
>              info->rw = rwpipe_open( argc - 1, &argv[ 1 ] );

Patch looks OK.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list