diff --git a/client/commands.c b/client/commands.c index 41baae15..0510e511 100644 --- a/client/commands.c +++ b/client/commands.c @@ -195,7 +195,7 @@ cmd_find_common_match(struct cmd_node *root, char *cmd, int len, int *pcount, ch (*pcount)++; if (best < 0) { - strncpy(buf, m->token + len, BIRDC_INPUT_COMPLETE_BUFFER_LEN); + strlcpy(buf, m->token + len, BIRDC_INPUT_COMPLETE_BUFFER_LEN); best = m->len - len; best_prio = m->prio; }