[vlc-commits] asf: fix SIGSEGV when accessing invalid tracks

Thomas Guillem git at videolan.org
Tue Sep 26 13:40:27 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Sep 26 13:39:58 2017 +0200| [6f22c26a4966fe7cecd3a6eea69979511b20b6ea] | committer: Thomas Guillem

asf: fix SIGSEGV when accessing invalid tracks

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

 modules/demux/asf/asf.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index 8f8c85f858..5530333866 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -482,13 +482,10 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
                 for( int j = 0; j < MAX_ASF_TRACKS ; j++ )
                 {
                     tk = p_sys->track[j];
-                    if( !tk->p_fmt || tk->i_cat != -1 * i )
+                    if( !tk || !tk->p_fmt || tk->i_cat != -1 * i )
                         continue;
-                    if( tk )
-                    {
-                        FlushQueue( tk );
-                        tk->i_time = -1;
-                    }
+                    FlushQueue( tk );
+                    tk->i_time = -1;
                 }
             }
 



More information about the vlc-commits mailing list