[FFmpeg-cvslog] avformat/oggparseogm: Check ff_alloc_extradata() for failure
Michael Niedermayer
git at videolan.org
Tue Apr 11 22:32:04 EEST 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Apr 11 15:08:07 2017 +0200| [9eff4b0d2b5013e1ede86cf1a152dce164217d52] | committer: Michael Niedermayer
avformat/oggparseogm: Check ff_alloc_extradata() for failure
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9eff4b0d2b5013e1ede86cf1a152dce164217d52
---
libavformat/oggparseogm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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);
}
}
More information about the ffmpeg-cvslog
mailing list