Browse Source

avcodec/lossless_audiodsp: Fix undefined overflows in scalarproduct_and_madd_int16_c()

Fixes: signed integer overflow: 2142077091 + 6881070 cannot be represented in type 'int'
Fixes: 22737/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5958388889681920

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 c0dfe134be)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.2.4
Michael Niedermayer 5 years ago
parent
commit
7a00fd4964
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/lossless_audiodsp.c

+ 1
- 1
libavcodec/lossless_audiodsp.c View File

@@ -27,7 +27,7 @@ static int32_t scalarproduct_and_madd_int16_c(int16_t *v1, const int16_t *v2,
const int16_t *v3, const int16_t *v3,
int order, int mul) int order, int mul)
{ {
int res = 0;
unsigned res = 0;


do { do {
res += *v1 * *v2++; res += *v1 * *v2++;


Loading…
Cancel
Save