summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortdeval <tdeval@openbsd.org>2003-04-25 21:19:55 +0000
committertdeval <tdeval@openbsd.org>2003-04-25 21:19:55 +0000
commit718cb12e0cbdfba4b1f22463feb78f3693f856e0 (patch)
tree92c6de4cef8c295cb19533b6ec5c1c1a9c3b3b17
parentfix typo; tom@minnesota.com (diff)
downloadwireguard-openbsd-718cb12e0cbdfba4b1f22463feb78f3693f856e0.tar.xz
wireguard-openbsd-718cb12e0cbdfba4b1f22463feb78f3693f856e0.zip
strings... ok henning@, millert@, tedu@
-rw-r--r--games/cribbage/io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/games/cribbage/io.c b/games/cribbage/io.c
index f44ea1eeeb5..d0f51be1887 100644
--- a/games/cribbage/io.c
+++ b/games/cribbage/io.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: io.c,v 1.7 2002/02/19 19:39:36 millert Exp $ */
+/* $OpenBSD: io.c,v 1.8 2003/04/25 21:19:55 tdeval Exp $ */
/* $NetBSD: io.c,v 1.9 1997/07/09 06:25:47 phil Exp $ */
/*-
@@ -401,7 +401,7 @@ msg(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
- (void)vsprintf(&Msgbuf[Newpos], fmt, ap);
+ (void)vsnprintf(&Msgbuf[Newpos], sizeof Msgbuf - Newpos, fmt, ap);
Newpos = strlen(Msgbuf);
va_end(ap);
endmsg();
@@ -417,7 +417,7 @@ addmsg(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
- (void)vsprintf(&Msgbuf[Newpos], fmt, ap);
+ (void)vsnprintf(&Msgbuf[Newpos], sizeof Msgbuf - Newpos, fmt, ap);
Newpos = strlen(Msgbuf);
va_end(ap);
}