[FFmpeg-cvslog] r20319 - trunk/libavformat/utils.c
bcoudurier
subversion
Mon Oct 19 20:55:27 CEST 2009
Author: bcoudurier
Date: Mon Oct 19 20:55:27 2009
New Revision: 20319
Log:
check stream index validity in av_program_add_stream_index
Modified:
trunk/libavformat/utils.c
Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c Mon Oct 19 20:53:32 2009 (r20318)
+++ trunk/libavformat/utils.c Mon Oct 19 20:55:27 2009 (r20319)
@@ -2833,6 +2833,11 @@ void av_program_add_stream_index(AVForma
AVProgram *program=NULL;
void *tmp;
+ if (idx >= ac->nb_streams) {
+ av_log(ac, AV_LOG_ERROR, "stream index %d is not valid\n", idx);
+ return;
+ }
+
for(i=0; i<ac->nb_programs; i++){
if(ac->programs[i]->id != progid)
continue;
More information about the ffmpeg-cvslog
mailing list