1
0
mirror of https://github.com/mstorsjo/fdk-aac.git synced 2024-12-13 00:46:51 +01:00

Merge "Unsigned Integer Overflow in SpatialDecParseSpecificConfigHeader()." am: 0695cff3dd

am: 36b3869e2c

Change-Id: I2a7d3a865dce40cbce0c2b345b8f489a8e4a7e3f
This commit is contained in:
Fraunhofer IIS FDK 2018-11-27 12:47:01 -08:00 committed by android-build-merger
commit 479cc5a6d4

View File

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