mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
15141f939d
commit
9bb3b7d028
@ -247,6 +247,9 @@ static int ogg_read_page(AVFormatContext *s, int *str)
|
||||
if (ogg->headers) {
|
||||
int n;
|
||||
|
||||
if (ogg->nstreams != 1)
|
||||
return idx;
|
||||
|
||||
for (n = 0; n < ogg->nstreams; n++) {
|
||||
av_freep(&ogg->streams[n].buf);
|
||||
if (!ogg->state || ogg->state->streams[n].private != ogg->streams[n].private)
|
||||
|
Loading…
Reference in New Issue
Block a user