Commit e85e417
Validate arguments to String.sub (#49)
* Validate arguments to String.sub
Check for potential situation in which `stop' - start'` is out of bounds of the buffer (which will raise a confusing `Invalid_argument "String.sub / Byte.sub"` error).
* Update frontc/clexer.mll
strengthens the check
Co-authored-by: Ivan Gotovchits <[email protected]>1 parent ce8c1d6 commit e85e417
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
0 commit comments