Commit 2d8ed5a
authored
Fix out-of-bounds access in IT66021_Get_VTMG() bubble sort
The inner loop in IT66021_Get_VTMG() reads r9a[j+1] while iterating j from
IT66121_9A_READ_N - 1, which can access one element past the end of the array.
This change adjusts the loop bound to prevent out-of-bounds access while
preserving the existing sorting behavior.
Is a full refactor necessary to address the bounds violation?1 parent f1b6c45 commit 2d8ed5a
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
0 commit comments