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