diff options
author | Thierry Deval <tdeval@cvs.openbsd.org> | 2003-04-25 21:19:56 +0000 |
---|---|---|
committer | Thierry Deval <tdeval@cvs.openbsd.org> | 2003-04-25 21:19:56 +0000 |
commit | e11872b39b196c5f389f499f74d67a9ff7193b9a (patch) | |
tree | 99abf3419dfc13c8f0510c5d38b685e68e01b567 | |
parent | 9b736bb2fe860cad1b37bae539dafb8184200885 (diff) |
strings... ok henning@, millert@, tedu@
-rw-r--r-- | games/cribbage/io.c | 6 |
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); } |