Always NUL-terminate buffer in keys_fill_missing()

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer 2018-05-26 12:05:41 +02:00
parent 7efe03cf05
commit 68cac7345c

View File

@ -720,6 +720,7 @@ void keys_fill_missing(void)
char *p, tmpbuf[BUFSIZ];
strncpy(tmpbuf, keydef[i].binding, BUFSIZ);
tmpbuf[BUFSIZ - 1] = '\0';
p = tmpbuf;
for (;;) {
char key_ch[BUFSIZ];