0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-10-18 01:54:08 +00:00

Fix string handling in inputs completing in birdc

Thanks to Martin Mares for notice
This commit is contained in:
Pavel Tvrdík 2015-11-02 16:52:16 +01:00
parent e547061f33
commit 8396fe3654

View File

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