[FFmpeg-cvslog] avcodec/iff: Fix bytestream advance
Michael Niedermayer
git at videolan.org
Sun Jun 12 20:31:16 CEST 2016
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Jun 12 20:13:36 2016 +0200| [c3ad63c6a3d5ea3497682e9581388f9481c34451] | committer: Michael Niedermayer
avcodec/iff: Fix bytestream advance
Fixes Ticket5585
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c3ad63c6a3d5ea3497682e9581388f9481c34451
---
libavcodec/iff.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index 96ecd8a..7f3414b 100644
--- a/libavcodec/iff.c
+++ b/libavcodec/iff.c
@@ -541,6 +541,8 @@ static int decode_byterun(uint8_t *dst, int dst_size,
if (value >= 0) {
length = FFMIN3(value + 1, dst_size - x, bytestream2_get_bytes_left(gb));
bytestream2_get_buffer(gb, dst + x, length);
+ if (length < value + 1)
+ bytestream2_skip(gb, value + 1 - length);
} else if (value > -128) {
length = FFMIN(-value + 1, dst_size - x);
memset(dst + x, bytestream2_get_byte(gb), length);
More information about the ffmpeg-cvslog
mailing list