Commit 1d5c4b1
committed
Java front-end: fix vector index type in populate_live_range_holes
CodeQL rightly complained that there is comparison using a more narrow
type on the left-hand side of a less-than in a loop condition, which may
give rise to a non-terminating loop in case of integer overflow.
While at it, also add checks before unconditionally accessing the first
element.1 parent 98c23f5 commit 1d5c4b1
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| 516 | + | |
516 | 517 | | |
517 | 518 | | |
518 | 519 | | |
519 | 520 | | |
520 | | - | |
521 | | - | |
522 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
523 | 524 | | |
| 525 | + | |
524 | 526 | | |
525 | | - | |
526 | | - | |
527 | | - | |
| 527 | + | |
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
| |||
0 commit comments