From dcd0b4f3121d903070282ee013b2de939bc0fa49 Mon Sep 17 00:00:00 2001 From: Markus Linnala Date: Tue, 11 Oct 2016 18:07:25 +0300 Subject: [PATCH] utils_format_graphite: terminate buffer with \0 Signed-off-by: Florian Forster --- src/utils_format_graphite.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils_format_graphite.c b/src/utils_format_graphite.c index 023f7a46..00980514 100644 --- a/src/utils_format_graphite.c +++ b/src/utils_format_graphite.c @@ -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); -- 2.11.0