mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 13:10:37 +00: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) {
|
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user