[FFmpeg-cvslog] avcodec/iff: check for end of buffer in input for delta_l decompression
Paul B Mahol
git at videolan.org
Sat May 14 14:31:29 CEST 2016
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat May 14 14:29:59 2016 +0200| [51a1c1c6ac98d1d0d0a654f066782707af092fed] | committer: Paul B Mahol
avcodec/iff: check for end of buffer in input for delta_l decompression
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=51a1c1c6ac98d1d0d0a654f066782707af092fed
---
libavcodec/iff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index 3225524..674a5c2 100644
--- a/libavcodec/iff.c
+++ b/libavcodec/iff.c
@@ -1248,7 +1248,7 @@ static void decode_delta_l(uint8_t *dst,
bytestream2_init(&dgb, buf + 2 * poff0, buf_end - (buf + 2 * poff0));
bytestream2_init(&ogb, buf + 2 * poff1, buf_end - (buf + 2 * poff1));
- while ((bytestream2_peek_be16(&ogb)) != 0xFFFF) {
+ while ((bytestream2_peek_be16(&ogb)) != 0xFFFF && bytestream2_get_bytes_left(&ogb) >= 4) {
uint32_t offset = bytestream2_get_be16(&ogb);
int16_t cnt = bytestream2_get_be16(&ogb);
uint16_t data;
More information about the ffmpeg-cvslog
mailing list