-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There were two overflow cases hidden in the fromVLQSigned function:
1. Integer.MIN_VALUE would return 0, since -0 is just 0. All other negative numbers were fine. 2. Any number with the 31st bit set would be negated, because it used >> instead of >>>. So the 31st bit would be set to the 32nd (sign bit) when encoding, then remain at the 32nd bit when decoding. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=257839681
- Loading branch information
1 parent
224ba4b
commit 584418e
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters