diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-06-12 20:13:36 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-06-12 20:26:32 +0200 |
commit | c3ad63c6a3d5ea3497682e9581388f9481c34451 (patch) | |
tree | 2706ba220051b27f7ae2b3ad8bef4ddf4d66e565 /libavcodec/iff.c | |
parent | bd3fd467febe92300e0ebf8ff13c193f9236479a (diff) | |
download | ffmpeg-c3ad63c6a3d5ea3497682e9581388f9481c34451.tar.gz |
avcodec/iff: Fix bytestream advance
Fixes Ticket5585
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/iff.c')
-rw-r--r-- | libavcodec/iff.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/iff.c b/libavcodec/iff.c index 96ecd8a91a..7f3414bde9 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); |