Commit fc2a426
committed
fix: off-by-one bounds check
Correct an off-by-one bounds check in `parseParameter` (`builder/vmware/common/driver_parser.go`). The condition previously used `idxAddress+1 > len(val.operand)`, which could miss the single-operand case and risk an out-of-range access.
Changed to `idxAddress+1 >= len(val.operand)` so a single address is correctly parsed as a p`ParameterRange4` with `min == max`.
Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>1 parent f50d79b commit fc2a426
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
684 | | - | |
| 684 | + | |
685 | 685 | | |
686 | 686 | | |
687 | 687 | | |
| |||
2337 | 2337 | | |
2338 | 2338 | | |
2339 | 2339 | | |
2340 | | - | |
| 2340 | + | |
2341 | 2341 | | |
2342 | 2342 | | |
2343 | 2343 | | |
| |||
0 commit comments