Bug 1246433 - BaldrMonkey: Avoid shifting a negative signed value, on a CLOSED TREE. r=me

This commit is contained in:
Dan Gohman 2016-02-08 17:05:40 -08:00
parent 5540b0f3ea
commit 53d1a03526

View File

@ -578,7 +578,7 @@ class Decoder
u |= UInt(byte & 0x7F) << shift;
shift += 7;
} while (shift != numBitsInSevens);
if (!readU8(&byte) || (byte & (-1 << remainderBits)))
if (!readU8(&byte) || (byte & (unsigned(-1) << remainderBits)))
return false;
if (out)
*out = u | UInt(byte) << numBitsInSevens;