aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-17 14:44:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-17 14:44:06 +0200
commitc7c976c6d7051804f96e3106688c1963d1238ae0 (patch)
tree2aa192a9e6ed7023b1086ae7c25c5ca075ea0e9b
parent9bb3b7d028395a8fe70148dec89430e8aae7a7e2 (diff)
downloadffmpeg-c7c976c6d7051804f96e3106688c1963d1238ae0.tar.gz
oggdec: Safety check against stream counts being inconsistent in seek()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/oggdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index ab523790ec..6a55f89f97 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);