[vlc-commits] asf: Fix leak on duplicated stream ids

Hugo Beauzée-Luyssen git at videolan.org
Tue Aug 13 14:08:04 CEST 2019


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Aug 12 12:04:14 2019 +0200| [24f37e539c25359d2d963713bbafb861ed80bcf7] | committer: Hugo Beauzée-Luyssen

asf: Fix leak on duplicated stream ids

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

 modules/demux/asf/asf.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index d9f359fcd3..9bc4b3de70 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -873,6 +873,10 @@ static int DemuxInit( demux_t *p_demux )
                                i_stream );
         p_esp = NULL;
 
+        /* Ignore duplicated streams numbers */
+        if (p_sys->track[p_sp->i_stream_number])
+            continue;
+
         tk = p_sys->track[p_sp->i_stream_number] = malloc( sizeof( asf_track_t ) );
         if (!tk)
             goto error;



More information about the vlc-commits mailing list