[FFmpeg-cvslog] oggdec: Safety check against stream counts being inconsistent in seek()

Michael Niedermayer git at videolan.org
Tue Apr 17 16:26:41 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Apr 17 14:44:06 2012 +0200| [c7c976c6d7051804f96e3106688c1963d1238ae0] | committer: Michael Niedermayer

oggdec: Safety check against stream counts being inconsistent in seek()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/oggdec.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index ab52379..6a55f89 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -29,6 +29,7 @@
  */
 
 #include <stdio.h>
+#include "libavutil/avassert.h"
 #include "oggdec.h"
 #include "avformat.h"
 #include "internal.h"
@@ -690,6 +691,7 @@ static int ogg_read_seek(AVFormatContext *s, int stream_index,
     struct ogg_stream *os = ogg->streams + stream_index;
     int ret;
 
+    av_assert0(stream_index < ogg->nstreams);
     // Ensure everything is reset even when seeking via
     // the generated index.
     ogg_reset(ogg);



More information about the ffmpeg-cvslog mailing list