Skip to content

Commit

Permalink
Prevent an out-of-bounds load in connectivity sets
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgottesbueren committed Sep 22, 2024
1 parent afcf4b4 commit 70424b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mt-kahypar/datastructures/connectivity_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ class ConnectivitySets {
_shallow_copy_bitset() {
if ( num_hyperedges > 0 ) {
_bits.resize("Refinement", "connectivity_set",
static_cast<size_t>(num_hyperedges) * _num_blocks_per_hyperedge, true, assign_parallel);
static_cast<size_t>(num_hyperedges) * _num_blocks_per_hyperedge
+ 1 // The nextBlockID() implementation performs a (masked out) load past the end
, true, assign_parallel);
}
}

Expand Down

0 comments on commit 70424b0

Please sign in to comment.