Commit 9bb3b7d0 authored by Michael Niedermayer's avatar Michael Niedermayer

oggdec: Recreate streams only in the 1 stream case.

Other cases are not supported and lead to inconsistencies which
can lead to out of array writes.
Reported-by: 's avatarDale Curtis <dalecurtis@chromium.org>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 15141f93
...@@ -247,6 +247,9 @@ static int ogg_read_page(AVFormatContext *s, int *str) ...@@ -247,6 +247,9 @@ static int ogg_read_page(AVFormatContext *s, int *str)
if (ogg->headers) { if (ogg->headers) {
int n; int n;
if (ogg->nstreams != 1)
return idx;
for (n = 0; n < ogg->nstreams; n++) { for (n = 0; n < ogg->nstreams; n++) {
av_freep(&ogg->streams[n].buf); av_freep(&ogg->streams[n].buf);
if (!ogg->state || ogg->state->streams[n].private != ogg->streams[n].private) if (!ogg->state || ogg->state->streams[n].private != ogg->streams[n].private)
......
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