Null terminate string which resulted in failure of confdb during logging.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1687 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Steven Dake 2008-11-06 00:17:01 +00:00
parent 5edadb2df9
commit 418739f8f0

View File

@ -232,6 +232,7 @@ static inline int strcpy_cutoff (char *dest, char *src, int cutoff)
} else {
assert (cutoff > 0);
strncpy (dest, src, cutoff);
dest[cutoff] = '\0';
len = strlen (dest);
if (len != cutoff) {
memset (&dest[len], ' ', cutoff - len);