mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
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 <michael@niedermayer.cc>
(cherry picked from commit 033d2c4884
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2f095670c8
commit
e15fd9bc25
@ -531,7 +531,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;
|
||||
|
Loading…
Reference in New Issue
Block a user