[vlc-commits] rawvid: fix unlikely NULL dereference

Steve Lhomme git at videolan.org
Thu Apr 19 07:39:58 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Apr 19 07:39:27 2018 +0200| [31c9df2569ae0c77f3012e87ad2ae071c8af921d] | committer: Steve Lhomme

rawvid: fix unlikely NULL dereference

CID #1467998

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

 modules/demux/rawvid.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/demux/rawvid.c b/modules/demux/rawvid.c
index f8d5f973c9..08882e2e18 100644
--- a/modules/demux/rawvid.c
+++ b/modules/demux/rawvid.c
@@ -351,6 +351,8 @@ valid:
     }
     const vlc_chroma_description_t *dsc =
             vlc_fourcc_GetChromaDescription(p_sys->fmt_video.video.i_chroma);
+    if (unlikely(dsc == NULL))
+        goto error;
     p_sys->frame_size = 0;
     for (unsigned i=0; i<dsc->plane_count; i++)
     {



More information about the vlc-commits mailing list