1
0
mirror of https://github.com/mstorsjo/fdk-aac.git synced 2025-02-11 09:00:39 +01:00

Validate aacSampleRate after applying ELD downscale factor. Avoid division by zero.

Bug: 131430997
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc
Change-Id: I3f7ece9451121d40fab2c97571c695c1ac62bd00
This commit is contained in:
Fraunhofer IIS FDK 2019-08-09 17:06:37 +02:00 committed by Jean-Michel Trivi
parent dbfa1cd71b
commit 128abf6b1a

View File

@ -1928,6 +1928,9 @@ CAacDecoder_Init(HANDLE_AACDECODER self, const CSAudioSpecificConfig *asc,
self->samplingRateInfo[0].samplingRate / self->downscaleFactor;
self->streamInfo.aacSamplesPerFrame =
asc->m_samplesPerFrame / self->downscaleFactor;
if (self->streamInfo.aacSampleRate <= 0) {
return AAC_DEC_UNSUPPORTED_SAMPLINGRATE;
}
}
}