aboutsummaryrefslogtreecommitdiffstats
path: root/libMpegTPDec/src
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2018-05-09 13:32:45 +0200
committerJean-Michel Trivi <jmtrivi@google.com>2018-05-09 15:15:28 -0700
commit44ac411683e7cfbfdb1f58e02d54377d709c8dd4 (patch)
tree756d84f186478676d172f1afc3339c05c6b69709 /libMpegTPDec/src
parent9ab67882eca7454dc001e158bc1e6e2219d6650b (diff)
downloadfdk-aac-44ac411683e7cfbfdb1f58e02d54377d709c8dd4.tar.gz
fdk-aac-44ac411683e7cfbfdb1f58e02d54377d709c8dd4.tar.bz2
fdk-aac-44ac411683e7cfbfdb1f58e02d54377d709c8dd4.zip
FDK patches: fix overflows in decoder out-of-band config
Bug: 71430241 Bug: 79220129 Test: cts-tradefed run commandAndExit cts-dev -m CtsMediaTestCases -t android.media.cts.DecoderTestXheAac cts-tradefed run commandAndExit cts-dev -m CtsMediaTestCases -t android.media.cts.DecoderTestAacDrc Unsigned Integer Overflows in CDataStreamElement_Read() Change-Id: Ic2f5b3ae111bf984d4d0db664823798957b0a979 Unsigned Integer Overflow in CProgramConfig_ReadHeightExt() Change-Id: Iaebc458bb59504203e604a28ed6d5cecaa875c42 Unsigned Integer Overflow in transportDec_OutOfBandConfig() Change-Id: I24a4b32d736f28c55147f0e2ca06fe5537da19c2 Unsigned Integer Overflows in CDKcrcEndReg() & crcCalc() Change-Id: I6ebbe541a4d3b6bacbd5ace17264972951de7ca8 Unsigned Integer Overflows in ReadPsData() Change-Id: Id36576fe545236860a06f17971494ecd4484c494 Unsigned Integer Overflow in SpatialDecParseSpecificConfig() Change-Id: Ib468f129a951c69776b88468407f008ab4cfd2c7 Unsigned Integer Overflows in _readUniDrcConfigExtension() & _readLoudnessInfoSetExtension() Change-Id: Ibcf7c6a23af49239206ea9301c58adac36e3ceba
Diffstat (limited to 'libMpegTPDec/src')
-rw-r--r--libMpegTPDec/src/tpdec_asc.cpp4
-rw-r--r--libMpegTPDec/src/tpdec_lib.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/libMpegTPDec/src/tpdec_asc.cpp b/libMpegTPDec/src/tpdec_asc.cpp
index 74beaa6..b7fd2a1 100644
--- a/libMpegTPDec/src/tpdec_asc.cpp
+++ b/libMpegTPDec/src/tpdec_asc.cpp
@@ -257,11 +257,11 @@ static int CProgramConfig_ReadHeightExt(CProgramConfig *pPce,
}
} else {
/* No valid extension data found -> restore the initial bitbuffer state */
- FDKpushBack(bs, startAnchor - FDKgetValidBits(bs));
+ FDKpushBack(bs, (INT)startAnchor - (INT)FDKgetValidBits(bs));
}
/* Always report the bytes read. */
- *bytesAvailable -= (startAnchor - FDKgetValidBits(bs)) >> 3;
+ *bytesAvailable -= ((INT)startAnchor - (INT)FDKgetValidBits(bs)) >> 3;
return (err);
}
diff --git a/libMpegTPDec/src/tpdec_lib.cpp b/libMpegTPDec/src/tpdec_lib.cpp
index 306bec0..5eeb7fc 100644
--- a/libMpegTPDec/src/tpdec_lib.cpp
+++ b/libMpegTPDec/src/tpdec_lib.cpp
@@ -283,7 +283,7 @@ TRANSPORTDEC_ERROR transportDec_OutOfBandConfig(HANDLE_TRANSPORTDEC hTp,
for (i = 0; i < 2; i++) {
if (i > 0) {
- FDKpushBack(hBs, length * 8 - FDKgetValidBits(hBs));
+ FDKpushBack(hBs, (INT)length * 8 - (INT)FDKgetValidBits(hBs));
configMode = AC_CM_ALLOC_MEM;
}