1
0
mirror of https://github.com/mstorsjo/fdk-aac.git synced 2025-01-23 12:21:07 +01:00

Unsigned Integer Overflow in SpatialDecParseSpecificConfigHeader().

Bug: 112661893
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc

Change-Id: I5994a55f993835fa511ff61a337726b3e51aed5d
This commit is contained in:
Fraunhofer IIS FDK 2018-06-08 18:08:57 +02:00 committed by Jean-Michel Trivi
parent a4d6ca7b07
commit b325367b33

View File

@ -291,13 +291,13 @@ SACDEC_ERROR SpatialDecParseSpecificConfigHeader(
if (sacHeaderLen == 127) {
sacHeaderLen += FDKreadBits(bitstream, 16);
}
numFillBits = FDKgetValidBits(bitstream);
numFillBits = (INT)FDKgetValidBits(bitstream);
err = SpatialDecParseSpecificConfig(bitstream, pSpatialSpecificConfig,
sacHeaderLen, coreCodec);
numFillBits -=
FDKgetValidBits(bitstream); /* the number of read bits (tmpBits) */
(INT)FDKgetValidBits(bitstream); /* the number of read bits (tmpBits) */
numFillBits = (8 * sacHeaderLen) - numFillBits;
if (numFillBits < 0) {
/* Parsing went wrong */