diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-04-11 15:08:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-14 12:20:15 +0200 |
commit | bb61a312234003f49ad0a2bc84faccfff7f246d4 (patch) | |
tree | 4c9ed3c6312fde9f37a77269d97876e23341cea6 | |
parent | 773c55b820cbe419c4a8e2968bc9d711f69cc7a5 (diff) | |
download | ffmpeg-bb61a312234003f49ad0a2bc84faccfff7f246d4.tar.gz |
avformat/oggparseogm: Check ff_alloc_extradata() for failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9eff4b0d2b5013e1ede86cf1a152dce164217d52)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/oggparseogm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c index cdbdfd66e0..e7a501b5a7 100644 --- a/libavformat/oggparseogm.c +++ b/libavformat/oggparseogm.c @@ -110,7 +110,8 @@ ogm_header(AVFormatContext *s, int idx) size -= 52; if (bytestream2_get_bytes_left(&p) < size) return AVERROR_INVALIDDATA; - ff_alloc_extradata(st->codecpar, size); + if (ff_alloc_extradata(st->codecpar, size) < 0) + return AVERROR(ENOMEM); bytestream2_get_buffer(&p, st->codecpar->extradata, st->codecpar->extradata_size); } } |