Fix string termination in refclock parameter parser
This commit is contained in:
parent
dd4fb511a5
commit
19f3a6bca8
1 changed files with 1 additions and 1 deletions
2
conf.c
2
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;
|
||||
|
|
Loading…
Reference in a new issue