From f19e863cce96cc1e5f4ad7ce512810d5a2843ea6 Mon Sep 17 00:00:00 2001 From: Fraunhofer IIS FDK Date: Wed, 23 May 2018 18:33:57 +0200 Subject: Fix unsigned integer overflow in aacDecoder_UpdateBitStreamCounters() Bug: 80314771 Test: play AAC content over 2GB Change-Id: If791305bf95680b945971f9dc5f58495cbf6c8cd --- libAACdec/src/aacdecoder_lib.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libAACdec/src') diff --git a/libAACdec/src/aacdecoder_lib.cpp b/libAACdec/src/aacdecoder_lib.cpp index cd112b6..d98cf5a 100644 --- a/libAACdec/src/aacdecoder_lib.cpp +++ b/libAACdec/src/aacdecoder_lib.cpp @@ -1085,12 +1085,12 @@ static void aacDecoder_UpdateBitStreamCounters(CStreamInfo *pSi, INT nBytes; nBytes = nBits >> 3; - pSi->numTotalBytes = (UINT)((INT)pSi->numTotalBytes + nBytes); + pSi->numTotalBytes += nBytes; if (IS_OUTPUT_VALID(ErrorStatus)) { pSi->numTotalAccessUnits++; } if (IS_DECODE_ERROR(ErrorStatus)) { - pSi->numBadBytes = (UINT)((INT)pSi->numBadBytes + nBytes); + pSi->numBadBytes += nBytes; pSi->numBadAccessUnits++; } } -- cgit v1.2.3