mirror of
https://github.com/mstorsjo/fdk-aac.git
synced 2025-06-05 22:39:13 +02:00
Merge "Unsigned Integer Overflow in InitSegmentBitfield()"
am: 4899e80a17
Change-Id: I4cb328300795db2c02b5d4ab01f5e4c4aecd0117
This commit is contained in:
@@ -367,7 +367,10 @@ static UINT InitSegmentBitfield(UINT *pNumSegment,
|
|||||||
UINT tempWord;
|
UINT tempWord;
|
||||||
USHORT numValidSegment;
|
USHORT numValidSegment;
|
||||||
|
|
||||||
*pNumWordForBitfield = ((*pNumSegment - 1) >> THIRTYTWO_LOG_DIV_TWO_LOG) + 1;
|
*pNumWordForBitfield =
|
||||||
|
(*pNumSegment == 0)
|
||||||
|
? 0
|
||||||
|
: ((*pNumSegment - 1) >> THIRTYTWO_LOG_DIV_TWO_LOG) + 1;
|
||||||
|
|
||||||
/* loop over all words, which are completely used or only partial */
|
/* loop over all words, which are completely used or only partial */
|
||||||
/* bit in pSegmentBitfield is zero if segment is empty; bit in
|
/* bit in pSegmentBitfield is zero if segment is empty; bit in
|
||||||
|
Reference in New Issue
Block a user