aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-11-28 21:21:41 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-11-28 21:21:41 +0000
commitb8a384b0cd7bf2447bc342f14b01eda81e6c23a6 (patch)
treed7912e8d36871d2e0d9798561a1e1ed8ba6d386f
parent0695cff3ddcccae44d347a3ed25ef52f86b884a0 (diff)
parentc6b4af4a6c4ea03025aacb8c60e54a79e2ab8129 (diff)
downloadfdk-aac-b8a384b0cd7bf2447bc342f14b01eda81e6c23a6.tar.gz
fdk-aac-b8a384b0cd7bf2447bc342f14b01eda81e6c23a6.tar.bz2
fdk-aac-b8a384b0cd7bf2447bc342f14b01eda81e6c23a6.zip
Merge "Add sanity check for allowed LPD sampling rate."
-rw-r--r--libAACdec/src/usacdec_lpd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/libAACdec/src/usacdec_lpd.cpp b/libAACdec/src/usacdec_lpd.cpp
index 22069a6..fde34ef 100644
--- a/libAACdec/src/usacdec_lpd.cpp
+++ b/libAACdec/src/usacdec_lpd.cpp
@@ -1221,8 +1221,7 @@ AAC_DECODER_ERROR CLpdChannelStream_Read(
(INT)(samplingRate * PIT_MIN_12k8 + (FSCALE_DENOM / 2)) / FSCALE_DENOM -
(INT)PIT_MIN_12k8;
- if (pSamplingRateInfo->samplingRate >
- FAC_FSCALE_MAX /* maximum allowed core sampling frequency */) {
+ if ((samplingRate < FAC_FSCALE_MIN) || (samplingRate > FAC_FSCALE_MAX)) {
error = AAC_DEC_PARSE_ERROR;
goto bail;
}