[vlc-commits] rawvid: fix unlikely NULL dereference

Steve Lhomme git at videolan.org
Thu Apr 19 10:33:44 CEST 2018


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Apr 19 07:39:27 2018 +0200| [48772c466713f36e91b2986d9ad67792c35925fe] | committer: Hugo Beauzée-Luyssen

rawvid: fix unlikely NULL dereference

CID #1467998

(cherry picked from commit 31c9df2569ae0c77f3012e87ad2ae071c8af921d)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=48772c466713f36e91b2986d9ad67792c35925fe
---

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

diff --git a/modules/demux/rawvid.c b/modules/demux/rawvid.c
index 345b93a733..6f40c48afd 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