Code

utils_format_graphite: terminate buffer with \0
authorMarkus Linnala <Markus.Linnala@cybercom.com>
Tue, 11 Oct 2016 15:07:25 +0000 (18:07 +0300)
committerFlorian Forster <octo@collectd.org>
Wed, 12 Oct 2016 14:44:30 +0000 (16:44 +0200)
Signed-off-by: Florian Forster <octo@collectd.org>
src/utils_format_graphite.c

index 023f7a46a5240f7a7f52e3c9d6f237c91f932223..0098051434c27056ee171b78eb9126c6f5938edc 100644 (file)
@@ -250,6 +250,7 @@ int format_graphite (char *buffer, size_t buffer_size,
         }
         memcpy((void *) (buffer + buffer_pos), message, message_len);
         buffer_pos += message_len;
+        buffer[buffer_pos] = '\0';
     }
     sfree (rates);
     return (status);