[vlc-commits] demux: stl: fix NULL deref on decoder failure

Francois Cartegnie git at videolan.org
Wed Jan 25 21:30:52 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jan 25 21:17:36 2017 +0100| [b824b989229f5131b4be780ad0b0c5c49056bbfe] | committer: Francois Cartegnie

demux: stl: fix NULL deref on decoder failure

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

 modules/demux/stl.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/demux/stl.c b/modules/demux/stl.c
index b3df928..da0d998 100644
--- a/modules/demux/stl.c
+++ b/modules/demux/stl.c
@@ -224,11 +224,16 @@ static int Open(vlc_object_t *object)
     fmt.p_extra = header;
 
     sys->es = es_out_Add(demux->out, &fmt);
-
     fmt.i_extra = 0;
     fmt.p_extra = NULL;
     es_format_Clean(&fmt);
 
+    if(sys->es == NULL)
+    {
+        Close(object);
+        return VLC_EGENERIC;
+    }
+
     demux->p_sys      = sys;
     demux->pf_demux   = Demux;
     demux->pf_control = Control;



More information about the vlc-commits mailing list