diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2018-05-09 17:26:58 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-05-09 17:26:58 -0700 |
commit | 3727e8927f02558b21317ab8291727372ea0beb7 (patch) | |
tree | 756d84f186478676d172f1afc3339c05c6b69709 /libAACdec | |
parent | b2ce5c82bd4288b0e55d23f8cbf1d51150d752fc (diff) | |
parent | 57d474b424be58783e7abba469d2f3d800094967 (diff) | |
download | fdk-aac-3727e8927f02558b21317ab8291727372ea0beb7.tar.gz fdk-aac-3727e8927f02558b21317ab8291727372ea0beb7.tar.bz2 fdk-aac-3727e8927f02558b21317ab8291727372ea0beb7.zip |
FDK patches: fix overflows in decoder out-of-band config am: 44ac411683
am: 57d474b424
Change-Id: I88183937af5edfb0430f64618b8c25f066f698de
Diffstat (limited to 'libAACdec')
-rw-r--r-- | libAACdec/src/aacdecoder.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libAACdec/src/aacdecoder.cpp b/libAACdec/src/aacdecoder.cpp index 64adb56..3cbdffd 100644 --- a/libAACdec/src/aacdecoder.cpp +++ b/libAACdec/src/aacdecoder.cpp @@ -437,7 +437,8 @@ static AAC_DECODER_ERROR CDataStreamElement_Read(HANDLE_AACDECODER self, UCHAR *elementInstanceTag, UINT alignmentAnchor) { AAC_DECODER_ERROR error = AAC_DEC_OK; - UINT dataStart, dseBits; + UINT dseBits; + INT dataStart; int dataByteAlignFlag, count; FDK_ASSERT(self != NULL); @@ -460,14 +461,14 @@ static AAC_DECODER_ERROR CDataStreamElement_Read(HANDLE_AACDECODER self, FDKbyteAlign(bs, alignmentAnchor); } - dataStart = FDKgetValidBits(bs); + dataStart = (INT)FDKgetValidBits(bs); error = CAacDecoder_AncDataParse(&self->ancData, bs, count); transportDec_CrcEndReg(self->hInput, crcReg); { /* Move to the beginning of the data chunk */ - FDKpushBack(bs, dataStart - FDKgetValidBits(bs)); + FDKpushBack(bs, dataStart - (INT)FDKgetValidBits(bs)); /* Read Anc data if available */ aacDecoder_drcMarkPayload(self->hDrcInfo, bs, DVB_DRC_ANC_DATA); @@ -477,7 +478,7 @@ static AAC_DECODER_ERROR CDataStreamElement_Read(HANDLE_AACDECODER self, PCMDMX_ERROR dmxErr = PCMDMX_OK; /* Move to the beginning of the data chunk */ - FDKpushBack(bs, dataStart - FDKgetValidBits(bs)); + FDKpushBack(bs, dataStart - (INT)FDKgetValidBits(bs)); /* Read DMX meta-data */ dmxErr = pcmDmx_Parse(self->hPcmUtils, bs, dseBits, 0 /* not mpeg2 */); @@ -487,8 +488,7 @@ static AAC_DECODER_ERROR CDataStreamElement_Read(HANDLE_AACDECODER self, } /* Move to the very end of the element. */ - FDKpushBiDirectional( - bs, (INT)FDKgetValidBits(bs) - (INT)dataStart + (INT)dseBits); + FDKpushBiDirectional(bs, (INT)FDKgetValidBits(bs) - dataStart + (INT)dseBits); return error; } |