Skip to content

Commit

Permalink
#2125: Fix incorrect max buffer length
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable committed Nov 7, 2023
1 parent ec4052e commit 51da09c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vt/group/collective/group_info_collective.cc
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ void InfoColl::finalize() {
buf[0] = '\0';
int cur = 0;
for (auto&& elm : collective_->span_children_) {
cur += snprintf(buf + cur, max_buffer_length, "%d,", elm);
cur += snprintf(buf + cur, max_buffer_length - cur, "%d,", elm);
}

auto const& num_children = collective_->span_children_.size();
Expand Down

0 comments on commit 51da09c

Please sign in to comment.