Skip to content
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
2 changes: 1 addition & 1 deletion libopensm/osm_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ static ib_api_status_t dbg_do_line(IN char **pp_local, IN uint32_t buf_size,
sprintf(line, "%s%s", p_prefix_str, p_new_str);
len = (uint32_t) strlen(line);
*p_total_len += len;
if (*p_total_len + sizeof('\0') > buf_size)
if (*p_total_len + 1 /* NUL */ > buf_size)
return IB_INSUFFICIENT_MEMORY;

strcpy(*pp_local, line);
Expand Down