summaryrefslogtreecommitdiffstats
path: root/src/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/io.c b/src/io.c
index d358263..1494d94 100644
--- a/src/io.c
+++ b/src/io.c
@@ -1095,6 +1095,7 @@ void io_load_keys(const char *pager)
while (*p == ' ')
p++;
(void)strncpy(tmpbuf, p, BUFSIZ);
+ tmpbuf[BUFSIZ - 1] = '\0';
if (sscanf(tmpbuf, "%s", key_ch) == AWAITED) {
int ch;