From e80aa47abf74b9dda336d3e156fb49402093ec44 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 29 Dec 2013 23:38:20 +0100 Subject: [PATCH] avcodec/lagarith: fix init_get_bits() size in lag_decode_arith_plane() untested due to lack of sample Signed-off-by: Michael Niedermayer --- libavcodec/lagarith.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c index 71e7e99e31..710558cbef 100644 --- a/libavcodec/lagarith.c +++ b/libavcodec/lagarith.c @@ -443,7 +443,7 @@ static int lag_decode_arith_plane(LagarithContext *l, uint8_t *dst, offset += 4; } - init_get_bits(&gb, src + offset, src_size * 8); + init_get_bits(&gb, src + offset, (src_size - offset) * 8); if (lag_read_prob_header(&rac, &gb) < 0) return -1; -- 2.11.0