ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Wed May 18 12:46:43 2016 +0200| [810a8ba5b67389e808ed2f124e1cd54b8a26e679] | committer: Paul B Mahol
avcodec/iff: add forgotten checks for end of input buffer Signed-off-by: Paul B Mahol <one...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=810a8ba5b67389e808ed2f124e1cd54b8a26e679 --- libavcodec/iff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/iff.c b/libavcodec/iff.c index 5b819c8..dc3cb4b 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -1247,7 +1247,7 @@ static void decode_delta_d(uint8_t *dst, bytestream2_init(&gb, buf + ofssrc, buf_end - (buf + ofssrc)); entries = bytestream2_get_be32(&gb); - while (entries) { + while (entries && bytestream2_get_bytes_left(&gb) >= 8) { int32_t opcode = bytestream2_get_be32(&gb); unsigned offset = bytestream2_get_be32(&gb); @@ -1302,7 +1302,7 @@ static void decode_delta_e(uint8_t *dst, bytestream2_init(&gb, buf + ofssrc, buf_end - (buf + ofssrc)); entries = bytestream2_get_be16(&gb); - while (entries) { + while (entries && bytestream2_get_bytes_left(&gb) >= 6) { int16_t opcode = bytestream2_get_be16(&gb); unsigned offset = bytestream2_get_be32(&gb); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog