aboutsummaryrefslogtreecommitdiffstats
path: root/libAACdec/src
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2018-05-25 19:06:33 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-05-25 19:06:33 -0700
commit1f93990cfc1bb76aa538634512938e39565f471a (patch)
tree41c65cebd836ff3f949f1134512985e4a1288593 /libAACdec/src
parent634d4f789cc713fd374db7b9dbcaeb1d89bf2d5e (diff)
parentf19e863cce96cc1e5f4ad7ce512810d5a2843ea6 (diff)
downloadfdk-aac-1f93990cfc1bb76aa538634512938e39565f471a.tar.gz
fdk-aac-1f93990cfc1bb76aa538634512938e39565f471a.tar.bz2
fdk-aac-1f93990cfc1bb76aa538634512938e39565f471a.zip
Fix unsigned integer overflow in aacDecoder_UpdateBitStreamCounters()
am: f19e863cce Change-Id: I0e8a97a690f959840fbb3a249e41b260ac87d922
Diffstat (limited to 'libAACdec/src')
-rw-r--r--libAACdec/src/aacdecoder_lib.cpp4
1 files changed, 2 insertions, 2 deletions
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++;
}
}