diff options
author | Michael Niedermayer <[email protected]> | 2021-05-28 20:18:25 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2021-10-06 13:54:16 +0200 |
commit | e56ee5a3e4d5110d2ef718249613591ad9c6a8e0 (patch) | |
tree | 199e1cc365ad8bf281aaaf423d7ed944758af0a5 | |
parent | c21762969e1e66870716d84c3ded81d866ab85b4 (diff) |
avcodec/aacpsy: Avoid floating point division by 0 of norm_fac
Fixes: Ticket7995
Fixes: CVE-2020-20446
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 223b5e8ac9f6461bb13ed365419ec485c5b2b002)
Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavcodec/aacpsy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c index fca692cb15..bd444fecdc 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]; |