Commit 584418e
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=2578396811 parent 224ba4b commit 584418e
File tree
2 files changed
+21
-2
lines changed- src/com/google/debugging/sourcemap
- test/com/google/debugging/sourcemap
2 files changed
+21
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
68 | 79 | | |
69 | 80 | | |
70 | 81 | | |
| |||
0 commit comments