Commit 8396fe36 authored by Pavel Tvrdík's avatar Pavel Tvrdík
Browse files

Fix string handling in inputs completing in birdc

Thanks to Martin Mares for notice
parent e547061f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -195,7 +195,7 @@ cmd_find_common_match(struct cmd_node *root, char *cmd, int len, int *pcount, ch
      (*pcount)++;
      (*pcount)++;
      if (best < 0)
      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 = m->len - len;
	  best_prio = m->prio;
	  best_prio = m->prio;
	}
	}