diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2019-11-13 16:10:07 +0100 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2020-01-22 11:59:29 -0800 |
commit | cedcc475f52dd704497524dda6ec2ef430d2b6c5 (patch) | |
tree | 1e8c7295686f97e3b680c299923ef3d22aabb3e0 /libDRCdec/src | |
parent | e323bf6cabad6cafd31fc77c4d8c14bb48ea71e1 (diff) | |
download | fdk-aac-cedcc475f52dd704497524dda6ec2ef430d2b6c5.tar.gz fdk-aac-cedcc475f52dd704497524dda6ec2ef430d2b6c5.tar.bz2 fdk-aac-cedcc475f52dd704497524dda6ec2ef430d2b6c5.zip |
Reject undefined fPow() input data in _compressorIO_sigmoid_common().
Bug: 146938418
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: Iae4730ab5f5cef7c0ac8830831d25cfcaa567a99
Diffstat (limited to 'libDRCdec/src')
-rw-r--r-- | libDRCdec/src/drcGainDec_preprocess.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libDRCdec/src/drcGainDec_preprocess.cpp b/libDRCdec/src/drcGainDec_preprocess.cpp index c543c53..8d94ace 100644 --- a/libDRCdec/src/drcGainDec_preprocess.cpp +++ b/libDRCdec/src/drcGainDec_preprocess.cpp @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten +© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -285,6 +285,9 @@ static DRC_ERROR _compressorIO_sigmoid_common( &e_tmp2); invExp = fDivNorm(FL2FXCONST_DBL(1.0f / (float)(1 << 1)), exp, &e_invExp); e_invExp += 1 - 5; + if (tmp2 < (FIXP_DBL)0) { + return DE_NOT_OK; + } denom = fPow(tmp2, e_tmp2, invExp, e_invExp, &e_denom); *out = fDivNormSigned(tmp, denom, &e_out); e_out += 7 - e_denom; |