ffmpeg | branch: release/3.3 | Michael Niedermayer <[email protected]> | Tue Apr 11 15:06:21 2017 +0200| [707d4c7fb5cee9f97fce848e8c3175c4a22ecdfb] | committer: Michael Niedermayer
avformat/oggparseogm: Check available data before reading global header Fixes use of uninitialized data Found-by: Thomas Guilbert <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 170d864d2c508ca8111b1d108e1e964007dab712) Signed-off-by: Michael Niedermayer <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=707d4c7fb5cee9f97fce848e8c3175c4a22ecdfb --- libavformat/oggparseogm.c | 2 ++ 1 file changed, 2 insertions(+) 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); } _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
