aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-05-28 20:18:25 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-09 22:02:20 +0200
commitf5d0848098c7877905a841b796c4e0a0de28620c (patch)
treeff100a3efd9f35d828e601a9cd5113a8317d6440
parentd6737266a9690975d0e1589295419c6781a4e7ac (diff)
downloadffmpeg-f5d0848098c7877905a841b796c4e0a0de28620c.tar.gz
avcodec/aacpsy: Avoid floating point division by 0 of norm_fac
Fixes: Ticket7995 Fixes: CVE-2020-20446 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 223b5e8ac9f6461bb13ed365419ec485c5b2b002) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/aacpsy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index a5fec7374e..790a84d217 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -794,7 +794,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel,
if (pe < 1.15f * desired_pe) {
/* 6.6.1.3.6 "Final threshold modification by linearization" */
- norm_fac = 1.0f / norm_fac;
+ norm_fac = norm_fac ? 1.0f / norm_fac : 0;
for (w = 0; w < wi->num_windows*16; w += 16) {
for (g = 0; g < num_bands; g++) {
AacPsyBand *band = &pch->band[w+g];