From 0c5a2d240a49a55852ec58a1dd1ce881a349a40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= Date: Fri, 30 May 2014 16:36:23 +0200 Subject: fix terminal type length in option parsing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Amadeusz Sławiński --- src/screen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/screen.c b/src/screen.c index c518c6f..5313119 100644 --- a/src/screen.c +++ b/src/screen.c @@ -595,10 +595,10 @@ main(int argc, char **argv) case 'T': if (--argc == 0) exit_with_usage(myname, "Specify terminal-type with -T", NULL); - if (strlen(*++argv) < 20) - strncpy(screenterm, *argv, 20); + if (strlen(*++argv) < MAXTERMLEN) + strncpy(screenterm, *argv, MAXTERMLEN); else - Panic(0, "-T: terminal name too long. (max. 20 char)"); + Panic(0, "-T: terminal name too long. (max. %d char)", MAXTERMLEN); nwin_options.term = screenterm; break; case 'q': -- cgit v1.2.1