summaryrefslogtreecommitdiff
path: root/games/cribbage/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'games/cribbage/io.c')
-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);
}