diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2018-06-29 16:35:24 +0200 |
---|---|---|
committer | WolfEnders <grzwolf1@gmail.com> | 2018-11-18 12:40:25 +0100 |
commit | 70d7432d80779dfd5b61d0b6b6c45c18a2701066 (patch) | |
tree | 3dc47129dc1ca550ffd6f88e15742ad1dc728679 | |
parent | e53e3b4dc583c9517d01e7ea5502112de84992c1 (diff) | |
download | android_external_aac-70d7432d80779dfd5b61d0b6b6c45c18a2701066.tar.gz android_external_aac-70d7432d80779dfd5b61d0b6b6c45c18a2701066.tar.bz2 android_external_aac-70d7432d80779dfd5b61d0b6b6c45c18a2701066.zip |
Add sampling rate sanity check
Bug: 112661641
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I8e416fb1501dabda20babd4a28a99ab06950b221
(cherry picked from commit ba003785774efe355bcac950158fc78a0cff0c2b)
-rw-r--r-- | libMpegTPDec/src/tpdec_asc.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libMpegTPDec/src/tpdec_asc.cpp b/libMpegTPDec/src/tpdec_asc.cpp index 4d7cc02..90390f6 100644 --- a/libMpegTPDec/src/tpdec_asc.cpp +++ b/libMpegTPDec/src/tpdec_asc.cpp @@ -924,7 +924,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; } |