summaryrefslogtreecommitdiffstats
path: root/cribbage/io.c
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2009-06-04 04:48:04 +0000
committerdholland <dholland@NetBSD.org>2009-06-04 04:48:04 +0000
commitb384b7ee2511f7ac65ac137707ffa6ad63d1e634 (patch)
tree65d239ef91b23f10e0990f3469e908c0231a8159 /cribbage/io.c
parent86553deab1e6eac9e62315da3ebc855cf6d8edd1 (diff)
downloadbsdgames-darwin-b384b7ee2511f7ac65ac137707ffa6ad63d1e634.tar.gz
bsdgames-darwin-b384b7ee2511f7ac65ac137707ffa6ad63d1e634.tar.zst
bsdgames-darwin-b384b7ee2511f7ac65ac137707ffa6ad63d1e634.zip
sprintf -> snprintf
Diffstat (limited to 'cribbage/io.c')
-rw-r--r--cribbage/io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cribbage/io.c b/cribbage/io.c
index ea2fedba..b661f2c9 100644
--- a/cribbage/io.c
+++ b/cribbage/io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: io.c,v 1.21 2007/12/15 19:44:39 perry Exp $ */
+/* $NetBSD: io.c,v 1.22 2009/06/04 04:48:04 dholland Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: io.c,v 1.21 2007/12/15 19:44:39 perry Exp $");
+__RCSID("$NetBSD: io.c,v 1.22 2009/06/04 04:48:04 dholland Exp $");
#endif
#endif /* not lint */
@@ -367,7 +367,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();
@@ -383,7 +383,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);
}