aboutsummaryrefslogtreecommitdiffstats
path: root/libMpegTPDec/src/tpdec_asc.cpp
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-10-12 23:07:54 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-10-12 23:07:54 +0000
commitb7cb239980c1cebec56249c2fc2e9cc8806fa724 (patch)
treeae2b2bd164968afce7c3727c7b6b205c2e3fc558 /libMpegTPDec/src/tpdec_asc.cpp
parent1ceab98d555e261f39efc75a1ec2d6786491be48 (diff)
parentf26eb8af7c38047ad113072a6de38e069dc5cf3f (diff)
downloadfdk-aac-b7cb239980c1cebec56249c2fc2e9cc8806fa724.tar.gz
fdk-aac-b7cb239980c1cebec56249c2fc2e9cc8806fa724.tar.bz2
fdk-aac-b7cb239980c1cebec56249c2fc2e9cc8806fa724.zip
Snap for 5936682 from f26eb8af7c38047ad113072a6de38e069dc5cf3f to rvc-release
Change-Id: I5a7309c9ef4f186d05c08f072707ce3e2bf6a9b8
Diffstat (limited to 'libMpegTPDec/src/tpdec_asc.cpp')
-rw-r--r--libMpegTPDec/src/tpdec_asc.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/libMpegTPDec/src/tpdec_asc.cpp b/libMpegTPDec/src/tpdec_asc.cpp
index 28bc22d..a86c2cb 100644
--- a/libMpegTPDec/src/tpdec_asc.cpp
+++ b/libMpegTPDec/src/tpdec_asc.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
@@ -1440,7 +1440,8 @@ static TRANSPORTDEC_ERROR EldSpecificConfig_Parse(CSAudioSpecificConfig *asc,
UCHAR tmpDownscaleFreqIdx;
esc->m_downscaledSamplingFrequency =
getSampleRate(hBs, &tmpDownscaleFreqIdx, 4);
- if (esc->m_downscaledSamplingFrequency == 0) {
+ if (esc->m_downscaledSamplingFrequency == 0 ||
+ esc->m_downscaledSamplingFrequency > 96000) {
return TRANSPORTDEC_PARSE_ERROR;
}
downscale_fill_nibble = FDKreadBits(hBs, 4);
@@ -1948,6 +1949,9 @@ static TRANSPORTDEC_ERROR UsacConfig_Parse(CSAudioSpecificConfig *asc,
INT nbits = (INT)FDKgetValidBits(hBs);
usacSamplingFrequency = getSampleRate(hBs, &asc->m_samplingFrequencyIndex, 5);
+ if (usacSamplingFrequency == 0 || usacSamplingFrequency > 96000) {
+ return TRANSPORTDEC_PARSE_ERROR;
+ }
asc->m_samplingFrequency = (UINT)usacSamplingFrequency;
coreSbrFrameLengthIndex = FDKreadBits(hBs, 3);
@@ -2027,7 +2031,8 @@ static TRANSPORTDEC_ERROR AudioSpecificConfig_ExtensionParse(
self->m_extensionSamplingFrequency = getSampleRate(
bs, &self->m_extensionSamplingFrequencyIndex, 4);
- if ((INT)self->m_extensionSamplingFrequency <= 0) {
+ if (self->m_extensionSamplingFrequency == 0 ||
+ self->m_extensionSamplingFrequency > 96000) {
return TRANSPORTDEC_PARSE_ERROR;
}
}
@@ -2153,6 +2158,10 @@ TRANSPORTDEC_ERROR AudioSpecificConfig_Parse(
self->m_extensionSamplingFrequency =
getSampleRate(bs, &self->m_extensionSamplingFrequencyIndex, 4);
+ if (self->m_extensionSamplingFrequency == 0 ||
+ self->m_extensionSamplingFrequency > 96000) {
+ return TRANSPORTDEC_PARSE_ERROR;
+ }
self->m_aot = getAOT(bs);
switch (self->m_aot) {