From b384b7ee2511f7ac65ac137707ffa6ad63d1e634 Mon Sep 17 00:00:00 2001 From: dholland Date: Thu, 4 Jun 2009 04:48:04 +0000 Subject: sprintf -> snprintf --- cribbage/io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cribbage/io.c') 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); } -- cgit v1.2.3-56-ge451