]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Use sstrncpy instead of strncpy in sysevent plugin 3277/head
authorAndrew Bays <andrew.bays@gmail.com>
Mon, 16 Sep 2019 18:08:09 +0000 (14:08 -0400)
committerAndrew Bays <andrew.bays@gmail.com>
Mon, 16 Sep 2019 18:08:09 +0000 (14:08 -0400)
src/sysevent.c

index b63767dbcb0089024c14ea99b9ec5354080e2266..aab51414446609a05c19440712925c1a1deb2fda 100644 (file)
@@ -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;
     }