[vlc-devel] [PATCH 1/3] preparser: Fix null dereference in case of error
Rémi Denis-Courmont
remi at remlab.net
Mon Nov 16 16:00:16 CET 2020
Le vendredi 13 novembre 2020, 15:07:02 EET Hugo Beauzée-Luyssen a écrit :
> ---
> src/preparser/preparser.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/preparser/preparser.c b/src/preparser/preparser.c
> index 255efc6ce1..0dbd4853d5 100644
> --- a/src/preparser/preparser.c
> +++ b/src/preparser/preparser.c
> @@ -367,6 +367,8 @@ void input_preparser_Push( input_preparser_t *preparser,
> : VLC_TICK_FROM_MS(timeout_ms);
>
> struct task *task =
> TaskNew(preparser, item, i_options, cbs, cbs_userdata, id,
> timeout); + if( !task )
> + return;
>
> PreparserAddTask(preparser, task);
if (unlikely(task == NULL))
Unless it's somehow likely to fail, that is.
--
Rémi Denis-Courmont
More information about the vlc-devel
mailing list