Avoid array out of bound error. git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2597 fd59a12c-fef9-0310-b244-a6a79926bd2f
@@ -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;
}