From 418739f8f0a41bc6a08287cc0bc2d48d9292184c Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Thu, 6 Nov 2008 00:17:01 +0000 Subject: [PATCH] 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 --- exec/logsys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/exec/logsys.c b/exec/logsys.c index 2d8ce077..099821f7 100644 --- a/exec/logsys.c +++ b/exec/logsys.c @@ -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);