diff options
Diffstat (limited to 'libavformat/oggparseogm.c')
-rw-r--r-- | libavformat/oggparseogm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c index f8e656dcb1..cdbdfd66e0 100644 --- a/libavformat/oggparseogm.c +++ b/libavformat/oggparseogm.c @@ -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); } |