This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Commit fd1bd24
Ian Hays
Fix UMS 32bit PositionPointer test.
The purpose of the test is to make the PositionPointer setter cast ulong.MaxValue to a long, producing -1 which will always be less than the UMS pointer so the final newPosition will be negative. On a 32 bit system where the pointer length is 4, the max value passable to the PositionPointer setter is uint.MaxValue. So in the test when we cast a value greater than uint.MaxValue to the 4-byte byte* we only get the uint.MaxValue bytes. Since casting a 4-byte pointer to a long will never result in overflow, the AOoRE can never be hit.1 parent c7f5b4b commit fd1bd24
1 file changed
+9
-2
lines changedLines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
| |||
0 commit comments