From 19f3a6bca85d5afe026eca73e95519e55ea76c6b Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 9 Sep 2009 17:12:43 +0200 Subject: [PATCH] Fix string termination in refclock parameter parser --- conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf.c b/conf.c index b5ef510..9bad6a1 100644 --- a/conf.c +++ b/conf.c @@ -464,7 +464,7 @@ parse_refclock(const char *line) param = MallocArray(char, 1 + line - tmp); strncpy(param, tmp, line - tmp); - param[line - tmp + 1] = '\0'; + param[line - tmp] = '\0'; while (sscanf(line, "%10s%n", cmd, &n) == 1) { line += n;