mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 16:52:31 +00:00
avformat/oggparseogm: Check available data before reading global header
Fixes use of uninitialized data Found-by: Thomas Guilbert <tguilbert@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
cd8e62746f
commit
170d864d2c
@ -108,6 +108,8 @@ ogm_header(AVFormatContext *s, int idx)
|
||||
if (size > 52) {
|
||||
av_assert0(AV_INPUT_BUFFER_PADDING_SIZE <= 52);
|
||||
size -= 52;
|
||||
if (bytestream2_get_bytes_left(&p) < size)
|
||||
return AVERROR_INVALIDDATA;
|
||||
ff_alloc_extradata(st->codecpar, size);
|
||||
bytestream2_get_buffer(&p, st->codecpar->extradata, st->codecpar->extradata_size);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user