mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-07-26 15:03:52 +00:00
Avoid array out of bound error.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2529 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
765fa65351
commit
494bf45ebf
@ -1457,7 +1457,7 @@ static char * pid_to_name (pid_t pid, char *out_name, size_t name_len)
|
||||
|
||||
/* copy the name */
|
||||
strncpy (out_name, name, name_len);
|
||||
out_name[name_len] = '\0';
|
||||
out_name[name_len - 1] = '\0';
|
||||
return out_name;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user