aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-02-18 16:55:52 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2018-04-13 00:35:15 +0200
commitb172815c3c9bb7dcaa88e388418bbbefd5aa978e (patch)
treed3281e719777ca8680305d9ea5e89dbd8a2da9ee
parent1a387f1ce6ec8a8b57849adac5ffbb53c1d07c83 (diff)
downloadffmpeg-b172815c3c9bb7dcaa88e388418bbbefd5aa978e.tar.gz
avcodec/aacdec_templat: Fix integer overflow in apply_ltp()
Fixes: signed integer overflow: -1625276744 + -1041893960 cannot be represented in type 'int' Fixes: 5948/clusterfuzz-testcase-minimized-5791479856365568 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 33fe17bdc88d51a8e0c87aa1e8011aaaf38a7a90) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/aacdec_template.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index 6a93aed2e8..659b6e5a31 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -2522,7 +2522,7 @@ static void apply_ltp(AACContext *ac, SingleChannelElement *sce)
for (sfb = 0; sfb < FFMIN(sce->ics.max_sfb, MAX_LTP_LONG_SFB); sfb++)
if (ltp->used[sfb])
for (i = offsets[sfb]; i < offsets[sfb + 1]; i++)
- sce->coeffs[i] += predFreq[i];
+ sce->coeffs[i] += (UINTFLOAT)predFreq[i];
}
}