input_complete(int arg UNUSED, int key UNUSED)
{
static int complete_flag;
- char buf[256];
+ char buf[BIRDC_INPUT_COMPLETE_BUFFER_LEN];
if (rl_last_func != input_complete)
complete_flag = 0;
extern int init, busy, interactive;
extern int term_lns, term_cls;
+#define BIRDC_INPUT_COMPLETE_BUFFER_LEN 256
+
/* birdc.c / birdcl.c */
void input_start_list(void);
(*pcount)++;
if (best < 0)
{
- strcpy(buf, m->token + len);
+ strncpy(buf, m->token + len, BIRDC_INPUT_COMPLETE_BUFFER_LEN);
best = m->len - len;
best_prio = m->prio;
}