You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/oggdec: Reallocate buffer before writing into it
Fixes: out of array write
Fixes: Regression since f619e1ec66
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -441,6 +441,12 @@ static int ogg_read_page(AVFormatContext *s, int *sid, int probing)
|
||||
|
||||
os = ogg->streams + idx;
|
||||
|
||||
ret = buf_realloc(os, size);
|
||||
if (ret < 0) {
|
||||
av_free(readout_buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
memcpy(os->buf + os->bufpos, readout_buf, size);
|
||||
av_free(readout_buf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user