[vlc-commits] mux: mp4: check alloc return (cid #1346924)

Francois Cartegnie git at videolan.org
Thu Dec 31 22:51:56 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec 31 18:56:59 2015 +0100| [ab45fefcb525ddd4c4d1e915556aeab5dacef36b] | committer: Francois Cartegnie

mux: mp4: check alloc return (cid #1346924)

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

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

diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c
index 9c16f1c..c566c10 100644
--- a/modules/mux/mp4/libmp4mux.c
+++ b/modules/mux/mp4/libmp4mux.c
@@ -80,7 +80,11 @@ bo_t *box_new(const char *fcc)
     if (!box)
         return NULL;
 
-    bo_init(box, 1024);
+    if(!bo_init(box, 1024))
+    {
+        bo_free(box);
+        return NULL;
+    }
 
     bo_add_32be  (box, 0);
     bo_add_fourcc(box, fcc);



More information about the vlc-commits mailing list