Commit 86278851 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/ttadsp: Fix several integer overflows in tta_filter_process_c()

Fixes: signed integer overflow: 1931744255 + 252497024 cannot be represented in type 'int'
Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-5763348114440192

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 0c433084
...@@ -20,9 +20,11 @@ ...@@ -20,9 +20,11 @@
#include "ttadsp.h" #include "ttadsp.h"
#include "config.h" #include "config.h"
static void tta_filter_process_c(int32_t *qm, int32_t *dx, int32_t *dl, static void tta_filter_process_c(int32_t *qmi, int32_t *dx, int32_t *dl,
int32_t *error, int32_t *in, int32_t shift, int32_t *error, int32_t *in, int32_t shift,
int32_t round) { int32_t round) {
uint32_t *qm = qmi;
if (*error < 0) { if (*error < 0) {
qm[0] -= dx[0]; qm[1] -= dx[1]; qm[2] -= dx[2]; qm[3] -= dx[3]; qm[0] -= dx[0]; qm[1] -= dx[1]; qm[2] -= dx[2]; qm[3] -= dx[3];
qm[4] -= dx[4]; qm[5] -= dx[5]; qm[6] -= dx[6]; qm[7] -= dx[7]; qm[4] -= dx[4]; qm[5] -= dx[5]; qm[6] -= dx[6]; qm[7] -= dx[7];
......
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