mirror of https://github.com/mstorsjo/fdk-aac.git
Merge "Unsigned Integer Overflows in mpegSurroundDecoder_Parse()."
This commit is contained in:
commit
e8b5674a5f
|
@ -1232,7 +1232,7 @@ int mpegSurroundDecoder_Parse(CMpegSurroundDecoder *pMpegSurroundDecoder,
|
||||||
|
|
||||||
FDK_ASSERT(pMpegSurroundDecoder->pSpatialDec);
|
FDK_ASSERT(pMpegSurroundDecoder->pSpatialDec);
|
||||||
|
|
||||||
mpsBsBits = FDKgetValidBits(hBs);
|
mpsBsBits = (INT)FDKgetValidBits(hBs);
|
||||||
|
|
||||||
sscParse = &pMpegSurroundDecoder
|
sscParse = &pMpegSurroundDecoder
|
||||||
->spatialSpecificConfig[pMpegSurroundDecoder->bsFrameParse];
|
->spatialSpecificConfig[pMpegSurroundDecoder->bsFrameParse];
|
||||||
|
@ -1308,14 +1308,14 @@ int mpegSurroundDecoder_Parse(CMpegSurroundDecoder *pMpegSurroundDecoder,
|
||||||
pMpegSurroundDecoder->spatialSpecificConfigBackup;
|
pMpegSurroundDecoder->spatialSpecificConfigBackup;
|
||||||
|
|
||||||
/* Parse spatial specific config */
|
/* Parse spatial specific config */
|
||||||
bitsRead = FDKgetValidBits(hMpsBsData);
|
bitsRead = (INT)FDKgetValidBits(hMpsBsData);
|
||||||
|
|
||||||
err = SpatialDecParseSpecificConfigHeader(
|
err = SpatialDecParseSpecificConfigHeader(
|
||||||
hMpsBsData,
|
hMpsBsData,
|
||||||
&pMpegSurroundDecoder->spatialSpecificConfigBackup, coreCodec,
|
&pMpegSurroundDecoder->spatialSpecificConfigBackup, coreCodec,
|
||||||
pMpegSurroundDecoder->upmixType);
|
pMpegSurroundDecoder->upmixType);
|
||||||
|
|
||||||
bitsRead = (bitsRead - FDKgetValidBits(hMpsBsData));
|
bitsRead = (bitsRead - (INT)FDKgetValidBits(hMpsBsData));
|
||||||
parseResult = ((err == MPS_OK) ? bitsRead : -bitsRead);
|
parseResult = ((err == MPS_OK) ? bitsRead : -bitsRead);
|
||||||
|
|
||||||
if (parseResult < 0) {
|
if (parseResult < 0) {
|
||||||
|
@ -1429,7 +1429,7 @@ int mpegSurroundDecoder_Parse(CMpegSurroundDecoder *pMpegSurroundDecoder,
|
||||||
|
|
||||||
bail:
|
bail:
|
||||||
|
|
||||||
*pMpsDataBits -= (mpsBsBits - FDKgetValidBits(hBs));
|
*pMpsDataBits -= (mpsBsBits - (INT)FDKgetValidBits(hBs));
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue