diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-02-09 18:09:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-01 13:33:44 +0200 |
commit | 1b2bb4877b23ced72be46f7a6b921baeb04a4a4b (patch) | |
tree | 084841d79155d576428352f2bdd5246364bcde81 | |
parent | 00aec6d9ba5d602542d0ac010f172e2a30194a66 (diff) | |
download | ffmpeg-1b2bb4877b23ced72be46f7a6b921baeb04a4a4b.tar.gz |
libavcodec/wmalosslessdec: prevent sum of positive numbers from becoming negative
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>
(cherry picked from commit 62e4003780cad60ac1371fef892da08c27069964)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/wmalosslessdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index c02b156f0f..22596bd5f8 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -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]; |