[FFmpeg-devel] [PATCH 2/2] avutil/tx_template: Use more unsigned ints to avoid undefined overflows
Michael Niedermayer
michael at niedermayer.cc
Wed Dec 7 01:48:08 EET 2022
Fixes: signed integer overflow: 574590586 - -1875616554 cannot be represented in type 'int'
Fixes: 53914/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5037125846564864
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavutil/tx_template.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavutil/tx_template.c b/libavutil/tx_template.c
index ac3dc22a2c..983de75a47 100644
--- a/libavutil/tx_template.c
+++ b/libavutil/tx_template.c
@@ -659,7 +659,7 @@ static void TX_NAME(ff_tx_fft8_ns)(AVTXContext *s, void *_dst,
{
TXComplex *src = _src;
TXComplex *dst = _dst;
- TXSample t1, t2, t3, t4, t5, t6, r0, i0, r1, i1;
+ TXUSample t1, t2, t3, t4, t5, t6, r0, i0, r1, i1;
const TXSample cos = TX_TAB(ff_tx_tab_8)[1];
TX_NAME(ff_tx_fft4_ns)(s, dst, src, stride);
@@ -680,7 +680,7 @@ static void TX_NAME(ff_tx_fft16_ns)(AVTXContext *s, void *_dst,
TXComplex *dst = _dst;
const TXSample *cos = TX_TAB(ff_tx_tab_16);
- TXSample t1, t2, t3, t4, t5, t6, r0, i0, r1, i1;
+ TXUSample t1, t2, t3, t4, t5, t6, r0, i0, r1, i1;
TXSample cos_16_1 = cos[1];
TXSample cos_16_2 = cos[2];
TXSample cos_16_3 = cos[3];
--
2.17.1
More information about the ffmpeg-devel
mailing list