avcodec/siren: Fix integer overflow in get_dw()
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 18 Mar 2020 19:20:43 +0000 (20:20 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 19 Mar 2020 01:19:25 +0000 (02:19 +0100)
Fixes: signed integer overflow: 685813396 + 1803454769 cannot be represented in type 'int'
Fixes: 21073/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SIREN_fuzzer-5744900508483584

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/siren.c

index 76dfe62..1c17d45 100644 (file)
@@ -363,7 +363,7 @@ typedef struct SirenContext {
     int sample_rate_bits;
     int region_size;
 
-    int dw1, dw2, dw3, dw4;
+    unsigned dw1, dw2, dw3, dw4;
 
     int absolute_region_power_index[32];
     float decoder_standard_deviation[32];