1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

avcodec/simple_idct: Fix undefined integer overflow in idct4row()

Fixes: signed integer overflow: -1498310196 - 902891776 cannot be represented in type 'int'
Fixes: 28445/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5075163389493248

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 57f7e5caa3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2020-12-18 00:31:08 +01:00
parent 9df52e5e46
commit 299da66195

View File

@ -161,7 +161,8 @@ static inline void idct4col_add(uint8_t *dest, int line_size, const int16_t *col
#define R_SHIFT 11
static inline void idct4row(int16_t *row)
{
int c0, c1, c2, c3, a0, a1, a2, a3;
unsigned c0, c1, c2, c3;
int a0, a1, a2, a3;
a0 = row[0];
a1 = row[1];