]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/mv30: Use unsigned in idct_1d()
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 14 Nov 2020 20:10:18 +0000 (21:10 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 21 Nov 2020 21:09:51 +0000 (22:09 +0100)
Fixes: signed integer overflow: 2110302399 + 39074947 cannot be represented in type 'int'
Fixes: 27330/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MV30_fuzzer-5664923153334272
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mv30.c

index 9f28199478f3242939ab0c04290dfff4e03d8245..59088d84f8d9829ea04333450d5dd7977b1e3176 100644 (file)
@@ -102,7 +102,7 @@ static void get_qtable(int16_t *table, int quant, const uint8_t *quant_tab)
     }
 }
 
-static inline void idct_1d(int *blk, int step)
+static inline void idct_1d(unsigned *blk, int step)
 {
     const unsigned t0 = blk[0 * step] + blk[4 * step];
     const unsigned t1 = blk[0 * step] - blk[4 * step];