[vlc-devel] [PATCH] Avoid NULL dereference within assert
Thomas Guillem
thomas at gllm.fr
Tue Mar 19 08:36:13 CET 2019
Hello,
You reported a valid issue but your patch is not correct. dec_device can be NULL here.
Here is the proper fix: http://git.videolan.org/?p=vlc.git;a=commitdiff;h=4c7e3ef2eb5202b7a3f7f3c34b75fd7b5879515e;hp=014e84a30c54a1831ed4deeac6506d98cde503b8
On Mon, Mar 18, 2019, at 20:07, chishtiawais511 at gmail.com wrote:
> From: Awais Chishti <chishtiawais511 at gmail.com>
>
> ---
> modules/hw/vaapi/filters.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/modules/hw/vaapi/filters.c b/modules/hw/vaapi/filters.c
> index 97f025f3f2..7d1066ef9c 100644
> --- a/modules/hw/vaapi/filters.c
> +++ b/modules/hw/vaapi/filters.c
> @@ -75,6 +75,7 @@ vlc_vaapi_FilterHoldInstance(filter_t *filter, VADisplay *dpy)
> holder.owner = filter;
> holder.dec_device = dec_device = pic->p_sys ?
> vlc_vaapi_PicSysHoldInstance(pic->p_sys, dpy) : NULL;
> + assert(holder.dec_device);
> assert(holder.dec_device->type == VLC_DECODER_DEVICE_VAAPI);
> }
> vlc_mutex_unlock(&holder.lock);
> --
> 2.21.0
>
> _______________________________________________
> 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