From: Florian Forster Date: Wed, 27 Aug 2008 15:38:40 +0000 (+0200) Subject: src/utils_parse_option.c: Null-terminate parsed quoted strings. X-Git-Tag: collectd-4.5.0~13 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=aac35f0faf646c9e20d34aea54d43ed6efe194a1;p=collectd.git src/utils_parse_option.c: Null-terminate parsed quoted strings. --- diff --git a/src/utils_parse_option.c b/src/utils_parse_option.c index 1531485f..d94c1400 100644 --- a/src/utils_parse_option.c +++ b/src/utils_parse_option.c @@ -66,6 +66,9 @@ int parse_string (char **ret_buffer, char **ret_string) /* No quote sign has been found */ if (*buffer == 0) return (-1); + + *dst = 0; + dst++; *buffer = 0; buffer++;