[vlc-commits] mux: mp4: unchecked return

Francois Cartegnie git at videolan.org
Thu Dec 31 00:00:11 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec 30 22:59:11 2015 +0100| [40a82fd491448d6dd766e8b6736d14235b1b8127] | committer: Francois Cartegnie

mux: mp4: unchecked return

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

 modules/mux/mp4/libmp4mux.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c
index 34ba005..9c16f1c 100644
--- a/modules/mux/mp4/libmp4mux.c
+++ b/modules/mux/mp4/libmp4mux.c
@@ -1138,6 +1138,12 @@ static bo_t *GetStblBox(vlc_object_t *p_obj, mp4mux_trackinfo_t *p_track, bool b
 
     /* sample to chunk table */
     bo_t *stsc = box_full_new("stsc", 0, 0);
+    if(!stsc)
+    {
+        bo_free(stco);
+        bo_free(stsd);
+        return NULL;
+    }
     bo_add_32be(stsc, 0);     // entry-count (fixed latter)
 
     unsigned i_chunk = 0;



More information about the vlc-commits mailing list