From: Andrew Bays Date: Mon, 16 Sep 2019 18:08:09 +0000 (-0400) Subject: Use sstrncpy instead of strncpy in sysevent plugin X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=d67f84e24b2520b5b1ccbbf1ff9d1f397e075417 Use sstrncpy instead of strncpy in sysevent plugin --- diff --git a/src/sysevent.c b/src/sysevent.c index b63767db..aab51414 100644 --- a/src/sysevent.c +++ b/src/sysevent.c @@ -472,7 +472,7 @@ static int read_socket() { } else { DEBUG("sysevent plugin: writing %s", buffer); - strncpy(ring.buffer[ring.head], buffer, sizeof(buffer)); + sstrncpy(ring.buffer[ring.head], buffer, sizeof(buffer)); ring.timestamp[ring.head] = cdtime(); ring.head = next; }