[vlc-devel] [PATCH] preparser: fix dereference of uninitialized pointer

Steve Lhomme robux4 at ycbcr.xyz
Wed Jun 5 09:34:01 CEST 2019


Seems logical to move it anyway.

On 2019-06-05 9:23, Thomas Guillem wrote:
> task->ref could be accessed from the input item preparser before being set.
> 
> Fixes #22377
> ---
>   src/preparser/preparser.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/preparser/preparser.c b/src/preparser/preparser.c
> index 5f39432cd3..f59519aef1 100644
> --- a/src/preparser/preparser.c
> +++ b/src/preparser/preparser.c
> @@ -128,14 +128,13 @@ static int PreparserOpenInput( void* preparser_, void* req_, void** out )
>       atomic_init( &task->done, false );
>   
>       task->preparser = preparser_;
> +    task->req = req;
> +    task->preparse_status = -1;
>       task->parser = input_item_Parse( req->item, preparser->owner, &cbs,
>                                        task );
>       if( !task->parser )
>           goto error;
>   
> -    task->req = req;
> -    task->preparse_status = -1;
> -
>       *out = task;
>   
>       return VLC_SUCCESS;
> -- 
> 2.20.1
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list