aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2018-12-26 12:12:30 -0800
committerandroid-build-merger <android-build-merger@google.com>2018-12-26 12:12:30 -0800
commitd200c4e9385ac0c3eb008b60c6314931b143b9d3 (patch)
treebedf093a34dbf7b03c7a20cae407c376e47f5be7
parentfc69d85bd4fef09a2543291b99bb356a6e61654c (diff)
parente8b5674a5f99b4d9c893ad5fcee24279cd3a81ac (diff)
downloadfdk-aac-d200c4e9385ac0c3eb008b60c6314931b143b9d3.tar.gz
fdk-aac-d200c4e9385ac0c3eb008b60c6314931b143b9d3.tar.bz2
fdk-aac-d200c4e9385ac0c3eb008b60c6314931b143b9d3.zip
Merge "Unsigned Integer Overflows in mpegSurroundDecoder_Parse()."
am: e8b5674a5f Change-Id: I4bb66aafb39f6d7321c2fa3f1fcc0fec0432ff26
-rw-r--r--libSACdec/src/sac_dec_lib.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libSACdec/src/sac_dec_lib.cpp b/libSACdec/src/sac_dec_lib.cpp
index ebf9bee..5ae89d1 100644
--- a/libSACdec/src/sac_dec_lib.cpp
+++ b/libSACdec/src/sac_dec_lib.cpp
@@ -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;
}