[vlc-commits] demux: mp4: segfault regression (fix #17603)

Francois Cartegnie git at videolan.org
Mon Nov 7 11:16:54 CET 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Nov  7 11:15:17 2016 +0100| [ce1a2fbb4188065e866e207973e11614201fd3a0] | committer: Francois Cartegnie

demux: mp4: segfault regression (fix #17603)

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

 modules/demux/mp4/mp4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index e8c045e..b86b7d8 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -1207,7 +1207,7 @@ static int Demux( demux_t *p_demux )
         for( i_track = 0; i_track < p_sys->i_tracks; i_track++ )
         {
             mp4_track_t *tk = &p_sys->track[i_track];
-            if( !tk->b_ok || tk->b_chapters_source || tk->i_sample_count == 0 )
+            if( !tk->b_ok || tk->b_chapters_source || tk->i_sample >= tk->i_sample_count )
                 continue;
             /* Test for EOF on each track (samples count, edit list) */
             b_eof &= ( i_nztime > MP4_TrackGetDTS( p_demux, tk ) );



More information about the vlc-commits mailing list