Don't shift 32-bit value by more than 32 bits.

PR:		207854
Approved by:	emaste
This commit is contained in:
Gleb Popov 2019-12-21 11:38:48 +00:00
parent fc8ae86a8f
commit 3f791e31fd

View File

@ -1468,7 +1468,7 @@ static t_Error CalcWredCurve(t_QmCgWredCurve *p_WredCurve, uint32_t *p_CurveWor
for (tmpA=(uint32_t)(64*pres) ; tmpA<128*pres; tmpA += pres )
for (tmpN=7 ; tmpN<64; tmpN++ )
{
tmp = ABS((int)(slope - tmpA/(1<<tmpN)));
tmp = ABS((int)(slope - tmpA/(1UL<<(tmpN%32))));
if (tmp < gap)
{
sa = tmpA;