Commit 62e40037 authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 2d465a40
...@@ -164,7 +164,7 @@ typedef struct WmallDecodeCtx { ...@@ -164,7 +164,7 @@ typedef struct WmallDecodeCtx {
int transient_pos[WMALL_MAX_CHANNELS]; int transient_pos[WMALL_MAX_CHANNELS];
int seekable_tile; 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]; int channel_residues[WMALL_MAX_CHANNELS][WMALL_BLOCK_MAX_SIZE];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment