Skip to content

Commit

Permalink
Merge pull request #158 from chu11/hostlist_valgrind_array_out_of_bounds
Browse files Browse the repository at this point in the history
common/hostlist: fix out of bounds array access
  • Loading branch information
mergify[bot] authored Aug 23, 2024
2 parents 64a7d37 + d59b352 commit 2547fe7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/common/hostlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -2278,6 +2278,11 @@ static void _iterator_advance(hostlist_iterator_t i)
return;
if (++(i->depth) > (i->hr->hi - i->hr->lo)) {
i->depth = 0;
if (i->idx >= (i->hl->size - 1)) {
++i->idx;
i->hr = NULL;
return;
}
i->hr = i->hl->hr[++i->idx];
}
}
Expand Down

0 comments on commit 2547fe7

Please sign in to comment.