diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2018-06-29 16:35:24 +0200 |
---|---|---|
committer | Tim Schumacher <timschumi@gmx.de> | 2019-01-15 17:31:48 +0100 |
commit | ea9ae6b6024940ac59663b3b36148e95a3a46b15 (patch) | |
tree | 124da2898e81ef2754fa1f697f2411e10eba0556 | |
parent | 6bba65a37bb6b2749e8cb9a4d2a5b20d15ed150d (diff) | |
download | android_external_aac-ea9ae6b6024940ac59663b3b36148e95a3a46b15.tar.gz android_external_aac-ea9ae6b6024940ac59663b3b36148e95a3a46b15.tar.bz2 android_external_aac-ea9ae6b6024940ac59663b3b36148e95a3a46b15.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 e697b48..6238dc6 100644 --- a/libMpegTPDec/src/tpdec_asc.cpp +++ b/libMpegTPDec/src/tpdec_asc.cpp @@ -1264,7 +1264,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; } |