mirror of
https://github.com/mstorsjo/fdk-aac.git
synced 2025-01-30 07:26:26 +01:00
Fix unsigned integer overflow in aacDecoder_UpdateBitStreamCounters()
Bug: 80314771 Test: play AAC content over 2GB Change-Id: If791305bf95680b945971f9dc5f58495cbf6c8cd
This commit is contained in:
parent
a4d1f0ad52
commit
f19e863cce
@ -861,14 +861,16 @@ typedef struct {
|
||||
returns AAC_DEC_TRANSPORT_SYNC_ERROR. It will be
|
||||
< 0 if the estimation failed. */
|
||||
|
||||
UINT numTotalBytes; /*!< This is the number of total bytes that have passed
|
||||
through the decoder. */
|
||||
UINT numBadBytes; /*!< This is the number of total bytes that were considered
|
||||
with errors from numTotalBytes. */
|
||||
UINT numTotalAccessUnits; /*!< This is the number of total access units that
|
||||
have passed through the decoder. */
|
||||
UINT numBadAccessUnits; /*!< This is the number of total access units that
|
||||
were considered with errors from numTotalBytes. */
|
||||
INT64 numTotalBytes; /*!< This is the number of total bytes that have passed
|
||||
through the decoder. */
|
||||
INT64
|
||||
numBadBytes; /*!< This is the number of total bytes that were considered
|
||||
with errors from numTotalBytes. */
|
||||
INT64
|
||||
numTotalAccessUnits; /*!< This is the number of total access units that
|
||||
have passed through the decoder. */
|
||||
INT64 numBadAccessUnits; /*!< This is the number of total access units that
|
||||
were considered with errors from numTotalBytes. */
|
||||
|
||||
/* Metadata */
|
||||
SCHAR drcProgRefLev; /*!< DRC program reference level. Defines the reference
|
||||
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user