From: Markus Linnala Date: Tue, 11 Oct 2016 15:07:25 +0000 (+0300) Subject: utils_format_graphite: terminate buffer with \0 X-Git-Tag: collectd-5.5.3~10 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=dcd0b4f3121d903070282ee013b2de939bc0fa49;p=collectd.git utils_format_graphite: terminate buffer with \0 Signed-off-by: Florian Forster --- 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);