Repository navigation
Commit 7df423c
authored
Fix #15139 validate arg indirect attribute before indexing direction array (#8850)
loadFunction writes `ac.direction[indirect]` where `indirect` comes
straight from the `indirect` attribute of an `<arg>` element in a
`--library` cfg file, with no range check, so a value like
`indirect="1000000"` or `indirect="-5"` writes outside the fixed
3-element `direction` array. Reject an out-of-range `indirect` with
`BAD_ATTRIBUTE_VALUE`, matching the bounds check `getArgDirection`
already applies when reading the same array.1 parent 0c4dc89 commit 7df423c
2 files changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
932 | 932 | | |
933 | 933 | | |
934 | 934 | | |
| 935 | + | |
| 936 | + | |
935 | 937 | | |
936 | 938 | | |
937 | 939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1156 | 1156 | | |
1157 | 1157 | | |
1158 | 1158 | | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
1159 | 1176 | | |
1160 | 1177 | | |
1161 | 1178 | | |
| |||
0 commit comments