Browse Source

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 62e4003780)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.8.17
Michael Niedermayer 6 years ago
parent
commit
1c200201cd
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/wmalosslessdec.c

+ 1
- 1
libavcodec/wmalosslessdec.c View File

@@ -163,7 +163,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];



Loading…
Cancel
Save