cavs: fix oCERT #2011-002 FFmpeg/libavcodec insufficient boundary check
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 10 Aug 2011 11:28:36 +0000 (13:28 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 10 Aug 2011 11:59:15 +0000 (13:59 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/cavsdec.c

index c6ccb06..6e83a7d 100644 (file)
@@ -115,7 +115,8 @@ static inline int get_ue_code(GetBitContext *gb, int order) {
 static int decode_residual_block(AVSContext *h, GetBitContext *gb,
                                  const struct dec_2dvlc *r, int esc_golomb_order,
                                  int qp, uint8_t *dst, int stride) {
-    int i, level_code, esc_code, level, run, mask;
+    int i, esc_code, level, mask;
+    unsigned int level_code, run;
     DCTELEM level_buf[65];
     uint8_t run_buf[65];
     DCTELEM *block = h->block;