OSDN Git Service

avcodec/lagarith: fix init_get_bits() size in lag_decode_arith_plane()
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 29 Dec 2013 22:38:20 +0000 (23:38 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 29 Dec 2013 23:55:32 +0000 (00:55 +0100)
untested due to lack of sample

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/lagarith.c

index 71e7e99..710558c 100644 (file)
@@ -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;