diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2018-12-20 15:52:46 +0100 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2019-03-14 08:58:57 -0700 |
commit | 1f908ac9b0bf42e6485a82a5b0d7d5247fd67f99 (patch) | |
tree | 4d75bfe058f7c8234b41beeac4f419b8d0f8dc4a /libDRCdec/src/drcDec_reader.cpp | |
parent | f164a97189891fb058080b831bef7431a25f3aa2 (diff) | |
download | fdk-aac-1f908ac9b0bf42e6485a82a5b0d7d5247fd67f99.tar.gz fdk-aac-1f908ac9b0bf42e6485a82a5b0d7d5247fd67f99.tar.bz2 fdk-aac-1f908ac9b0bf42e6485a82a5b0d7d5247fd67f99.zip |
Add MPEG-D DRC sanity checks
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I5413e43d5cfc895b8c3171f8857ca6feab6c269e
Diffstat (limited to 'libDRCdec/src/drcDec_reader.cpp')
-rw-r--r-- | libDRCdec/src/drcDec_reader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libDRCdec/src/drcDec_reader.cpp b/libDRCdec/src/drcDec_reader.cpp index 6fe7a04..e7b3360 100644 --- a/libDRCdec/src/drcDec_reader.cpp +++ b/libDRCdec/src/drcDec_reader.cpp @@ -1130,7 +1130,7 @@ static DRC_ERROR _readDrcCoefficientsUniDrc(HANDLE_FDK_BITSTREAM hBs, drcCharacteristicLeftPresent = FDKreadBits(hBs, 1); if (drcCharacteristicLeftPresent) { pCoef->characteristicLeftCount = FDKreadBits(hBs, 4); - if ((pCoef->characteristicLeftCount + 1) > 8) return DE_MEMORY_ERROR; + if ((pCoef->characteristicLeftCount + 1) > 16) return DE_MEMORY_ERROR; for (i = 0; i < pCoef->characteristicLeftCount; i++) { err = _readCustomDrcCharacteristic( hBs, CS_LEFT, &(pCoef->characteristicLeftFormat[i + 1]), @@ -1141,7 +1141,7 @@ static DRC_ERROR _readDrcCoefficientsUniDrc(HANDLE_FDK_BITSTREAM hBs, drcCharacteristicRightPresent = FDKreadBits(hBs, 1); if (drcCharacteristicRightPresent) { pCoef->characteristicRightCount = FDKreadBits(hBs, 4); - if ((pCoef->characteristicRightCount + 1) > 8) return DE_MEMORY_ERROR; + if ((pCoef->characteristicRightCount + 1) > 16) return DE_MEMORY_ERROR; for (i = 0; i < pCoef->characteristicRightCount; i++) { err = _readCustomDrcCharacteristic( hBs, CS_RIGHT, &(pCoef->characteristicRightFormat[i + 1]), |