summaryrefslogtreecommitdiff
path: root/lib/libcurses/tty
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-03-18 16:55:55 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-03-18 16:55:55 +0000
commitdfbb771c83664afc246a3834d4ec17f3169b5989 (patch)
treea6062cdd0136c3b4f82635b600a22a9bb6099569 /lib/libcurses/tty
parent9504d3161dd42533b38ffc7e455b079baddb6032 (diff)
Use strlcpy() / strlcat() throughout.
Diffstat (limited to 'lib/libcurses/tty')
-rw-r--r--lib/libcurses/tty/hardscroll.c4
-rw-r--r--lib/libcurses/tty/lib_mvcur.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/libcurses/tty/hardscroll.c b/lib/libcurses/tty/hardscroll.c
index 92dc08ebe6d..2633ce851e9 100644
--- a/lib/libcurses/tty/hardscroll.c
+++ b/lib/libcurses/tty/hardscroll.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hardscroll.c,v 1.5 2003/03/17 19:16:59 millert Exp $ */
+/* $OpenBSD: hardscroll.c,v 1.6 2003/03/18 16:55:54 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998,2000 Free Software Foundation, Inc. *
@@ -271,7 +271,7 @@ _nc_linedump(void)
if (have < want)
buf = typeMalloc(char, have = want);
- (void) strcpy(buf, "virt");
+ (void) strlcpy(buf, "virt", have);
for (n = 0; n < screen_lines; n++)
(void) snprintf(buf + strlen(buf), have - strlen(buf), " %02d",
OLDNUM(n));
diff --git a/lib/libcurses/tty/lib_mvcur.c b/lib/libcurses/tty/lib_mvcur.c
index 45b0a2b7178..8e7db26334a 100644
--- a/lib/libcurses/tty/lib_mvcur.c
+++ b/lib/libcurses/tty/lib_mvcur.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lib_mvcur.c,v 1.10 2001/01/22 18:02:00 millert Exp $ */
+/* $OpenBSD: lib_mvcur.c,v 1.11 2003/03/18 16:55:54 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
@@ -964,7 +964,7 @@ roll(int n)
int
main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
{
- (void) strcpy(tname, termname());
+ (void) strlcpy(tname, termname(), sizeof(tname));
load_term();
_nc_setupscreen(lines, columns, stdout);
baudrate();
@@ -1029,7 +1029,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
before.tv_sec)
* 1000000));
} else if (buf[0] == 'r') {
- (void) strcpy(tname, termname());
+ (void) strlcpy(tname, termname(), sizeof(tname));
load_term();
} else if (sscanf(buf, "l %s", tname) == 1) {
load_term();