mirror of https://github.com/mstorsjo/fdk-aac.git
Merge "Unsigned Integer Overflow in InitSegmentBitfield()" am: 4899e80a17
am: ca0d8e7461
Change-Id: Ia4e0396a4df14d667f80aded10631815b715e2c2
This commit is contained in:
commit
cafc42b5eb
|
@ -367,7 +367,10 @@ static UINT InitSegmentBitfield(UINT *pNumSegment,
|
|||
UINT tempWord;
|
||||
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 */
|
||||
/* bit in pSegmentBitfield is zero if segment is empty; bit in
|
||||
|
|
Loading…
Reference in New Issue