From 6d0094bf727e05d2105b8a20d569dd69c7a9d163 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Sat, 15 Nov 2014 12:39:36 +0100 Subject: [PATCH] src/intrfn.c: don't forget null byte when using strncat --- src/intrfn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intrfn.c b/src/intrfn.c index 9fc96b07..7b468c3c 100644 --- a/src/intrfn.c +++ b/src/intrfn.c @@ -875,7 +875,7 @@ int screen_buffer_display_ext(WINDOW *window, const char *options_org, const str const unsigned int itemLength=8; /* FIXME itemLength */ strncpy(options,"Q",sizeof(options)); - strncat(options,options_org,sizeof(options)-strlen(options)); + strncat(options, options_org, sizeof(options)-strlen(options)-1); if(intr_buffer_screen[intr_nbr_line][0]!='\0') intr_nbr_line++; /* curses interface */