Fix string termination in refclock parameter parser

This commit is contained in:
Miroslav Lichvar 2009-09-09 17:12:43 +02:00
parent dd4fb511a5
commit 19f3a6bca8

2
conf.c
View file

@ -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;