[vlc-commits] demux: stl: fix use-after-free

Thomas Guillem git at videolan.org
Wed Jul 26 15:42:59 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jul 26 15:41:52 2017 +0200| [dcbf5b094ce1824268d44e158b1391ed08febdfc] | committer: Thomas Guillem

demux: stl: fix use-after-free

demux->p_sys was not set before calling the Close function that used it. This
p_sys could have been set and free by an other demux module.

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

 modules/demux/stl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/demux/stl.c b/modules/demux/stl.c
index ffa6f4add9..b006821e40 100644
--- a/modules/demux/stl.c
+++ b/modules/demux/stl.c
@@ -292,6 +292,7 @@ static int Open(vlc_object_t *object)
             s->count = 0;
     }
 
+    demux->p_sys = sys;
     if (sys->count == 0 ||
         vlc_stream_Seek(demux->s, 1024 + 128LL * sys->index[0].blocknumber) != VLC_SUCCESS)
     {



More information about the vlc-commits mailing list