Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

locality: pass real upper bound to strncpy #694

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dart-impl/base/src/locality.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,9 @@ dart_ret_t dart__base__locality__domain_group(
immediate_subdomain_tag_len = dot_pos -
group_subdomain_tags[sd];
}
DART_ASSERT(DART_LOCALITY_DOMAIN_TAG_MAX_SIZE >= immediate_subdomain_tag_len);
strncpy(immediate_subdomain_tags[sd], group_subdomain_tags[sd],
immediate_subdomain_tag_len);
DART_LOCALITY_DOMAIN_TAG_MAX_SIZE);
immediate_subdomain_tags[sd][immediate_subdomain_tag_len] = '\0';
}
int num_group_subdomains = dart__base__strsunique(
Expand Down