From 68cac7345cfe4d90bf6caef8309462572fbd26de Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 26 May 2018 12:05:41 +0200 Subject: Always NUL-terminate buffer in keys_fill_missing() Signed-off-by: Lukas Fleischer --- src/keys.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/keys.c b/src/keys.c index 578c973..a06858d 100644 --- a/src/keys.c +++ b/src/keys.c @@ -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]; -- cgit v1.2.3-70-g09d2