diff options
author | Michael Niedermayer <[email protected]> | 2019-09-06 10:55:26 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2019-12-31 19:51:55 +0100 |
commit | 6271b13be6200ec4d7a72de1dce39dedd704dec9 (patch) | |
tree | c1f7e50caa6725eb4d558b33d6094146140011a6 | |
parent | 0373a4ce5398ab9b195120798811d92f51249741 (diff) |
avcodec/smacker: Fix integer overflow in signed int multiply in SMK_BLK_FILL
Fixes: signed integer overflow: 238 * 16843009 cannot be represented in type 'int'
Fixes: 16958/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKER_fuzzer-5193905355620352
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 033d2c4884eca3f4f80047bff93255b0cc4fa7a3)
Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavcodec/smacker.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index 61e316916b..27da0bc97a 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -536,7 +536,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, while(run-- && blk < blocks){ uint32_t col; out = smk->pic->data[0] + (blk / bw) * (stride * 4) + (blk % bw) * 4; - col = mode * 0x01010101; + col = mode * 0x01010101U; for(i = 0; i < 4; i++) { *((uint32_t*)out) = col; out += stride; |