Merge "Add sanity check for allowed LPD sampling rate."

am: b8a384b0cd

Change-Id: Iedcbbbee9ffc6b27cbc2f114b110974320f9044b
This commit is contained in:
Fraunhofer IIS FDK 2018-11-28 13:35:05 -08:00 committed by android-build-merger
commit 9cfaf0cd45
1 changed files with 1 additions and 2 deletions

View File

@ -1221,8 +1221,7 @@ AAC_DECODER_ERROR CLpdChannelStream_Read(
(INT)(samplingRate * PIT_MIN_12k8 + (FSCALE_DENOM / 2)) / FSCALE_DENOM - (INT)(samplingRate * PIT_MIN_12k8 + (FSCALE_DENOM / 2)) / FSCALE_DENOM -
(INT)PIT_MIN_12k8; (INT)PIT_MIN_12k8;
if (pSamplingRateInfo->samplingRate > if ((samplingRate < FAC_FSCALE_MIN) || (samplingRate > FAC_FSCALE_MAX)) {
FAC_FSCALE_MAX /* maximum allowed core sampling frequency */) {
error = AAC_DEC_PARSE_ERROR; error = AAC_DEC_PARSE_ERROR;
goto bail; goto bail;
} }