From 8396fe365484fd4e052835354f9d50e173324afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Tvrd=C3=ADk?= Date: Mon, 2 Nov 2015 16:52:16 +0100 Subject: [PATCH] Fix string handling in inputs completing in birdc Thanks to Martin Mares for notice --- client/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }