diff options
author | Peter Valchev <pvalchev@cvs.openbsd.org> | 2003-04-05 01:39:51 +0000 |
---|---|---|
committer | Peter Valchev <pvalchev@cvs.openbsd.org> | 2003-04-05 01:39:51 +0000 |
commit | 3388607b5c19719737994f8d27aaa451a7152d39 (patch) | |
tree | cdea6b8beea2ddf100f81af9ff58e8a6b4af5830 /usr.bin/window/wwprintf.c | |
parent | 6ef06ef3d19087a7d9962c574e73e4261e8d6ae6 (diff) |
snprintf, strlcpy; ok deraadt tdeval tedu krw
Diffstat (limited to 'usr.bin/window/wwprintf.c')
-rw-r--r-- | usr.bin/window/wwprintf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/window/wwprintf.c b/usr.bin/window/wwprintf.c index 4329cbf08ca..57c73fcc0e8 100644 --- a/usr.bin/window/wwprintf.c +++ b/usr.bin/window/wwprintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wwprintf.c,v 1.4 2002/10/04 16:39:26 mickey Exp $ */ +/* $OpenBSD: wwprintf.c,v 1.5 2003/04/05 01:39:50 pvalchev Exp $ */ /* $NetBSD: wwprintf.c,v 1.3 1995/09/28 10:35:44 tls Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)wwprintf.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: wwprintf.c,v 1.4 2002/10/04 16:39:26 mickey Exp $"; +static char rcsid[] = "$OpenBSD: wwprintf.c,v 1.5 2003/04/05 01:39:50 pvalchev Exp $"; #endif #endif /* not lint */ @@ -55,6 +55,6 @@ wwprintf(struct ww *w, char *fmt, ...) va_start(ap, fmt); /* buffer can overflow */ - (void) wwwrite(w, buf, vsprintf(buf, fmt, ap)); + (void) wwwrite(w, buf, vsnprintf(buf, sizeof(buf), fmt, ap)); va_end(ap); } |