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 023f7a4..0098051 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);