Skip to content

Commit

Permalink
DAOS-13716 cart: Fix coverity issue cid 1404275 (#12459) (#12491)
Browse files Browse the repository at this point in the history
- Fix cid 1404275 Copy into fixed size buffer

Signed-off-by: Alexander A Oganezov <alexander.a.oganezov@intel.com>
  • Loading branch information
frostedcmos authored Jun 29, 2023
1 parent d3cb8fb commit 776249a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cart/crt_hg.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ crt_get_opx_info_string(char *provider, char *domain, char *ip,
D_GOTO(out, rc = -DER_INVAL);
}

strcpy(domain_name, domain);
strncpy(domain_name, domain, sizeof(domain_name) - 1);
strtok_r(domain_name, &domain[delimiter], &hfi_str);
hfi = (unsigned int)strtoul(hfi_str, NULL, 10);

Expand Down

0 comments on commit 776249a

Please sign in to comment.