[vlc-commits] demux: smooth: fix null dereference (cid #1346951)

Francois Cartegnie git at videolan.org
Thu Dec 31 18:01:15 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec 31 17:32:46 2015 +0100| [486121cf80773d2398100d468ecffb991cc478e0] | committer: Francois Cartegnie

demux: smooth: fix null dereference (cid #1346951)

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

 modules/demux/smooth/playlist/ForgedInitSegment.cpp |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/smooth/playlist/ForgedInitSegment.cpp b/modules/demux/smooth/playlist/ForgedInitSegment.cpp
index 91d4f16..3f8f9e9 100644
--- a/modules/demux/smooth/playlist/ForgedInitSegment.cpp
+++ b/modules/demux/smooth/playlist/ForgedInitSegment.cpp
@@ -283,6 +283,9 @@ block_t * ForgedInitSegment::buildMoovBox()
         free(box);
     }
 
+    if(!moov)
+        return NULL;
+
     vlc_fourcc_t extra[] = {MAJOR_isom, VLC_FOURCC('p','i','f','f'), VLC_FOURCC('i','s','o','2'), VLC_FOURCC('s','m','o','o')};
     box = GetFtyp(VLC_FOURCC('i','s','m','l'), 1, extra, ARRAY_SIZE(extra));
 



More information about the vlc-commits mailing list