Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-09-06 11:55:26 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-15 14:25:46 +0300
commit6c4d2cc992cdcd414a149c8ab8213c121a06edc4 (patch)
treeedc0a35b88f930d301f4804521aa824f9248452a /libavcodec/smacker.c
parent9b73ca0bca6e3893a80580c1aedd5f46299d69e3 (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 <michael@niedermayer.cc> (cherry picked from commit 033d2c4884eca3f4f80047bff93255b0cc4fa7a3) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/smacker.c')
-rw-r--r--libavcodec/smacker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 2d20be9c10..843b73d33b 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -529,7 +529,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;