Commit 627a2b8
committed
[CAS] Fix an off-by-one error in CAS validation
Fix a false positive in invalid CAS detection that when the last data
stored in CAS just fits inside the DataPool, validation is erroneously
think the data stored pass the end of the storage.
The error happens when the size of the data is alignment - 1, as the
null termination padding will make the end of the data matches the end
of the data pool.
rdar://1503863741 parent 5842d95 commit 627a2b8
File tree
2 files changed
+8
-1
lines changed- llvm
- lib/CAS
- test/tools/llvm-cas
2 files changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
966 | 966 | | |
967 | 967 | | |
968 | 968 | | |
969 | | - | |
| 969 | + | |
970 | 970 | | |
971 | 971 | | |
972 | 972 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
4 | 11 | | |
5 | 12 | | |
6 | 13 | | |
| |||
0 commit comments