diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-06-18 20:40:23 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-06-18 20:40:23 +0000 |
commit | d46fa770f652a1357cf3d9b52414f221cec739f7 (patch) | |
tree | 0042a141fba5bc5c4bfbc101cadec4b9ddc67e8f | |
parent | 2b19c5a1ce90cea09a1bc72f417d7127b1c1319d (diff) |
Fix off by one error when setting up ttytype[]
-rw-r--r-- | lib/libtermlib/getterm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libtermlib/getterm.c b/lib/libtermlib/getterm.c index 87d8cdeedc8..3b50c6b354d 100644 --- a/lib/libtermlib/getterm.c +++ b/lib/libtermlib/getterm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getterm.c,v 1.2 1996/06/18 20:29:40 tholo Exp $ */ +/* $OpenBSD: getterm.c,v 1.3 1996/06/18 20:40:22 tholo Exp $ */ /* * Copyright (c) 1996 SigmaSoft, Th. Lockert <tholo@sigmasoft.com> @@ -31,7 +31,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: getterm.c,v 1.2 1996/06/18 20:29:40 tholo Exp $"; +static char rcsid[] = "$OpenBSD: getterm.c,v 1.3 1996/06/18 20:40:22 tholo Exp $"; #endif #include <stdlib.h> @@ -147,7 +147,7 @@ _ti_getterm(name) ttytype[MAXSIZE - 1] = '\0'; } else { - strncpy(ttytype, dummy + (dummy[2] == '|' ? 2 : 0), + strncpy(ttytype, dummy + (dummy[2] == '|' ? 3 : 0), MIN(MAXSIZE - 1, s - dummy)); ttytype[MAXSIZE - 1] = '\0'; *home = '\0'; |