[vlc-commits] vaapi: fix NULL dereference within assert

Thomas Guillem git at videolan.org
Tue Mar 19 08:34:52 CET 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Mar 19 08:32:55 2019 +0100| [4c7e3ef2eb5202b7a3f7f3c34b75fd7b5879515e] | committer: Thomas Guillem

vaapi: fix NULL dereference within assert

Reported-by: Awais Chishti <chishtiawais511 at gmail.com>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4c7e3ef2eb5202b7a3f7f3c34b75fd7b5879515e
---

 modules/hw/vaapi/filters.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/hw/vaapi/filters.c b/modules/hw/vaapi/filters.c
index 97f025f3f2..edbb22a7d4 100644
--- a/modules/hw/vaapi/filters.c
+++ b/modules/hw/vaapi/filters.c
@@ -75,7 +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->type == VLC_DECODER_DEVICE_VAAPI);
+        assert(dec_device == NULL || dec_device->type == VLC_DECODER_DEVICE_VAAPI);
     }
     vlc_mutex_unlock(&holder.lock);
     picture_Release(pic);



More information about the vlc-commits mailing list