1
0
mirror of https://github.com/mstorsjo/fdk-aac.git synced 2025-02-14 02:10:50 +01:00

Add sampling rate sanity check am: ba00378577

am: 4d1f3e3cfb

Change-Id: Ibed8fac5a4dee4017db2a3833feadefd3c49ea8a
This commit is contained in:
Fraunhofer IIS FDK 2018-09-06 13:32:29 -07:00 committed by android-build-merger
commit b5a223ae08

View File

@ -2102,7 +2102,9 @@ TRANSPORTDEC_ERROR AudioSpecificConfig_Parse(
self->m_aot = getAOT(bs);
self->m_samplingFrequency =
getSampleRate(bs, &self->m_samplingFrequencyIndex, 4);
if (self->m_samplingFrequency <= 0) {
if (self->m_samplingFrequency <= 0 ||
(self->m_samplingFrequency > 96000 && self->m_aot != 39) ||
self->m_samplingFrequency > 4 * 96000) {
return TRANSPORTDEC_PARSE_ERROR;
}