From fc575f6986d19205a3b97f1813246529c6d2fc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 5 Oct 2016 22:06:06 +0200 Subject: Fix various issues reported by coverity scan --- vis-menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vis-menu.c') diff --git a/vis-menu.c b/vis-menu.c index a316240..00ba9d5 100644 --- a/vis-menu.c +++ b/vis-menu.c @@ -458,7 +458,7 @@ run(void) { return EXIT_FAILURE; case CONTROL('M'): /* Return */ case CONTROL('J'): - if (sel) strncpy(text, sel->text, sizeof text); /* Complete the input first, when hitting return */ + if (sel) strncpy(text, sel->text, sizeof(text)-1); /* Complete the input first, when hitting return */ cursor = strlen(text); match(); drawmenu(); -- cgit v1.2.3