ra144enc: avoid integer overflows.
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 10 Sep 2012 18:54:03 +0000 (20:54 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 10 Sep 2012 19:04:01 +0000 (21:04 +0200)
The values are all positive but signed variables where used,
which overflowed.

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

index ceae878..e0fb827 100644 (file)
@@ -347,7 +347,8 @@ static void ra144_encode_subblock(RA144Context *ractx,
     float zero[BLOCKSIZE], cba[BLOCKSIZE], cb1[BLOCKSIZE], cb2[BLOCKSIZE];
     int16_t cba_vect[BLOCKSIZE];
     int cba_idx, cb1_idx, cb2_idx, gain;
-    int i, n, m[3];
+    int i, n;
+    unsigned m[3];
     float g[3];
     float error, best_error;