aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-12-06 23:44:37 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2022-12-25 19:33:24 +0100
commit9f040556696943f902290337a74eb9ee99c8a942 (patch)
tree1e446e2dea07de3974d82116eeda96479016c7d0
parenteb0455d64690eed0068e5cb202f72ecdf899837c (diff)
downloadffmpeg-9f040556696943f902290337a74eb9ee99c8a942.tar.gz
avutil/tx_template: Use more unsigned ints to avoid undefined overflows
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@niedermayer.cc>
-rw-r--r--libavutil/tx_template.c4
1 files 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];