aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-09-28 00:11:50 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-20 23:11:11 +0200
commit134b4d85a1a18e5de7bcec5483fe8d616e8efa7a (patch)
tree276fd963cda6a6e9a338a72cad0e3774f0481081
parent9d4a293b423fefd789b3c3176dac9742b49be4dd (diff)
downloadffmpeg-134b4d85a1a18e5de7bcec5483fe8d616e8efa7a.tar.gz
avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830()
Fixes: signed integer overflow: -2145648640 - 3357696 cannot be represented in type 'int' Fixes: 38899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5358815017566208 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 ad517ee6e44f093e28021ffd51c7eb2e1394b1a9) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/apedec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 8bd12f2315..d6a504f2bd 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -952,7 +952,7 @@ static void long_filter_ehigh_3830(int32_t *buffer, int length)
for (j = 7; j > 0; j--)
delay[j] = delay[j - 1];
delay[0] = buffer[i];
- buffer[i] -= dotprod >> 9;
+ buffer[i] -= (unsigned)(dotprod >> 9);
}
}