Commit c7c976c6 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 9bb3b7d0
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include "libavutil/avassert.h"
#include "oggdec.h" #include "oggdec.h"
#include "avformat.h" #include "avformat.h"
#include "internal.h" #include "internal.h"
...@@ -690,6 +691,7 @@ static int ogg_read_seek(AVFormatContext *s, int stream_index, ...@@ -690,6 +691,7 @@ static int ogg_read_seek(AVFormatContext *s, int stream_index,
struct ogg_stream *os = ogg->streams + stream_index; struct ogg_stream *os = ogg->streams + stream_index;
int ret; int ret;
av_assert0(stream_index < ogg->nstreams);
// Ensure everything is reset even when seeking via // Ensure everything is reset even when seeking via
// the generated index. // the generated index.
ogg_reset(ogg); ogg_reset(ogg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment