[vlc-commits] XSPF: fix leak on colliding track ID
Rémi Denis-Courmont
git at videolan.org
Sat Jun 4 16:01:19 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun 4 15:01:15 2011 +0300| [b856ec53290ec4ed5999406552662bde0023eeb6] | committer: Rémi Denis-Courmont
XSPF: fix leak on colliding track ID
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b856ec53290ec4ed5999406552662bde0023eeb6
---
modules/demux/playlist/xspf.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c
index a8a4e90..f715fb9 100644
--- a/modules/demux/playlist/xspf.c
+++ b/modules/demux/playlist/xspf.c
@@ -445,6 +445,13 @@ static bool parse_track_node COMPLEX_INTERFACE
while( p_sys->i_track_id >= p_sys->i_tracklist_entries )
pp[p_sys->i_tracklist_entries++] = NULL;
}
+ else if( p_sys->pp_tracklist[p_sys->i_track_id] != NULL )
+ {
+ msg_Err( p_demux, "track ID %d collision",
+ p_sys->i_track_id );
+ vlc_gc_decref( p_new_input );
+ return false;
+ }
p_sys->pp_tracklist[ p_sys->i_track_id ] = p_new_input;
return true;
More information about the vlc-commits
mailing list