From cd64a50f546ecbfd25035373ee745bd04e4e5905 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 13 Mar 2003 09:09:52 +0000 Subject: lots of sprintf -> snprintf and strcpy -> strlcpy; checked by tedu --- sbin/newfs/newfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sbin/newfs') diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index db1ceb4403d..7ab1d2755aa 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newfs.c,v 1.35 2002/05/26 09:24:35 deraadt Exp $ */ +/* $OpenBSD: newfs.c,v 1.36 2003/03/13 09:09:26 deraadt Exp $ */ /* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)newfs.c 8.8 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: newfs.c,v 1.35 2002/05/26 09:24:35 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: newfs.c,v 1.36 2003/03/13 09:09:26 deraadt Exp $"; #endif #endif /* not lint */ @@ -589,7 +589,7 @@ havelabel: if (mfs) { struct mfs_args args; - sprintf(buf, "mfs:%ld", (long)getpid()); + snprintf(buf, sizeof buf, "mfs:%ld", (long)getpid()); args.fspec = buf; args.export_info.ex_root = -2; if (mntflags & MNT_RDONLY) -- cgit v1.2.3