]> git.sesse.net Git - ffmpeg/commitdiff
libavcodec/wmalosslessdec: prevent sum of positive numbers from becoming negative
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 9 Feb 2020 17:09:24 +0000 (18:09 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 2 May 2020 15:29:23 +0000 (17:29 +0200)
Fixes: left shift of negative value -8321365
Fixes: 20506/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-4798062906310656
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/wmalosslessdec.c

index 88854879808379c09f6179f301e58efb47933c4b..c6c13fb417be21cecca8af57103e068faca322ac 100644 (file)
@@ -164,7 +164,7 @@ typedef struct WmallDecodeCtx {
     int transient_pos[WMALL_MAX_CHANNELS];
     int seekable_tile;
 
-    int ave_sum[WMALL_MAX_CHANNELS];
+    unsigned ave_sum[WMALL_MAX_CHANNELS];
 
     int channel_residues[WMALL_MAX_CHANNELS][WMALL_BLOCK_MAX_SIZE];