summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-04 22:03:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-04 22:03:56 +0000
commit4234a1a243b834469e3fe6f32ec3de5764c93d16 (patch)
treebb02a4d8e4408e207f1cb76a9330e7b20b1ace5c /usr.bin
parent502495f37efd945d1d9a38bdbf92d8712c0bc196 (diff)
easy snprintf; tedu ok
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tset/termcap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tset/termcap.c b/usr.bin/tset/termcap.c
index aa9a8ed677b..a60633f09f3 100644
--- a/usr.bin/tset/termcap.c
+++ b/usr.bin/tset/termcap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: termcap.c,v 1.3 2001/07/16 06:14:31 pvalchev Exp $ */
+/* $OpenBSD: termcap.c,v 1.4 2003/04/04 22:03:55 deraadt Exp $ */
/* $NetBSD: termcap.c,v 1.7 1995/06/05 19:45:52 pk Exp $ */
/*
@@ -35,7 +35,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: termcap.c,v 1.3 2001/07/16 06:14:31 pvalchev Exp $";
+static char rcsid[] = "$OpenBSD: termcap.c,v 1.4 2003/04/04 22:03:55 deraadt Exp $";
#endif /* not lint */
#define PVECSIZ 32 /* max number of names in path */
@@ -93,8 +93,8 @@ tcgetent(bp, name)
*home != '\0' &&
strlen(home) + sizeof(_PATH_DEF) <
sizeof(pathbuf)) {
- sprintf(pathbuf, "%s/%s", home,
- _PATH_DEF);
+ snprintf(pathbuf, sizeof pathbuf,
+ "%s/%s", home, _PATH_DEF);
} else {
strlcpy(pathbuf, _PATH_DEF,
sizeof(pathbuf));