summaryrefslogtreecommitdiffstats
path: root/libexec/bootpd/hwaddr.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1997-12-24 18:56:03 +0000
committerimp <imp@FreeBSD.org>1997-12-24 18:56:03 +0000
commit604bcde61e03e4ca051aae2c87b0f250a3806280 (patch)
tree1ef9d5908599dfec43502dee23a1b807123cb4dd /libexec/bootpd/hwaddr.c
parentd97fabbb53b5ec9256c2d5ae44081162784d35d7 (diff)
downloadFreeBSD-src-604bcde61e03e4ca051aae2c87b0f250a3806280.zip
FreeBSD-src-604bcde61e03e4ca051aae2c87b0f250a3806280.tar.gz
Use snprintf rather than printf out of paranoia
Obtained from: OpenBSD
Diffstat (limited to 'libexec/bootpd/hwaddr.c')
-rw-r--r--libexec/bootpd/hwaddr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/bootpd/hwaddr.c b/libexec/bootpd/hwaddr.c
index bc41cff..b4fe5e4 100644
--- a/libexec/bootpd/hwaddr.c
+++ b/libexec/bootpd/hwaddr.c
@@ -2,7 +2,7 @@
* hwaddr.c - routines that deal with hardware addresses.
* (i.e. Ethernet)
*
- * $Id$
+ * $Id: hwaddr.c,v 1.5 1997/02/22 14:21:07 peter Exp $
*/
#include <sys/types.h>
@@ -198,7 +198,7 @@ setarp(s, ia, hafamily, haddr, halen)
extern char *inet_ntoa();
a = inet_ntoa(*ia);
- sprintf(buf, "arp -d %s; arp -s %s %s temp",
+ snprintf(buf, sizeof(buf), "arp -d %s; arp -s %s %s temp",
a, a, haddrtoa(haddr, halen));
if (debug > 2)
report(LOG_INFO, buf);
OpenPOWER on IntegriCloud