Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-10-15 01:04:59 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-04-07 17:26:59 +0300
commit77fc0df720f0a3ea21cf4e44bf55518ef62ff5a7 (patch)
treecfafea115e7a072899f4a40a3c9c186be26716f1
parentffcba1be9a7c0386c9f8ef6591868dcb7fd0ea19 (diff)
avcodec/ttadsp: Fix integer overflows in tta_filter_process_c()
Fixes: signed integer overflow: 822841647 + 1647055738 cannot be represented in type 'int' Fixes: 39935/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-4592657142251520 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 f24028c798397af720acb838357785aa705a8122) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/ttadsp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/ttadsp.c b/libavcodec/ttadsp.c
index 1d1443aee0..99dd66a0c2 100644
--- a/libavcodec/ttadsp.c
+++ b/libavcodec/ttadsp.c
@@ -47,9 +47,9 @@ static void tta_filter_process_c(int32_t *qmi, int32_t *dx, int32_t *dl,
*error = *in;
*in += (round >> shift);
- dl[4] = -dl[5]; dl[5] = -dl[6];
- dl[6] = *in - dl[7]; dl[7] = *in;
- dl[5] += dl[6]; dl[4] += dl[5];
+ dl[4] = -(unsigned)dl[5]; dl[5] = -(unsigned)dl[6];
+ dl[6] = *in -(unsigned)dl[7]; dl[7] = *in;
+ dl[5] += (unsigned)dl[6]; dl[4] += (unsigned)dl[5];
}
av_cold void ff_ttadsp_init(TTADSPContext *c)