diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-03-13 09:09:52 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-03-13 09:09:52 +0000 |
commit | cd64a50f546ecbfd25035373ee745bd04e4e5905 (patch) | |
tree | 86a1452cec538b8f5259a45745e95cd1161d04e7 /usr.sbin/ypserv/stdethers | |
parent | 6153e3b8d9aedd43b1300c4d60217039c9485e02 (diff) |
lots of sprintf -> snprintf and strcpy -> strlcpy; checked by tedu
Diffstat (limited to 'usr.sbin/ypserv/stdethers')
-rw-r--r-- | usr.sbin/ypserv/stdethers/stdethers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ypserv/stdethers/stdethers.c b/usr.sbin/ypserv/stdethers/stdethers.c index 52690bc9a61..1bafed0b6c2 100644 --- a/usr.sbin/ypserv/stdethers/stdethers.c +++ b/usr.sbin/ypserv/stdethers/stdethers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stdethers.c,v 1.6 2002/07/19 20:59:40 deraadt Exp $ */ +/* $OpenBSD: stdethers.c,v 1.7 2003/03/13 09:09:51 deraadt Exp $ */ /* * Copyright (c) 1995 Mats O Jansson <moj@stacken.kth.se> @@ -32,7 +32,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: stdethers.c,v 1.6 2002/07/19 20:59:40 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: stdethers.c,v 1.7 2003/03/13 09:09:51 deraadt Exp $"; #endif #include <sys/types.h> @@ -62,7 +62,7 @@ working_ntoa(u_char *e) { static char a[] = "xx:xx:xx:xx:xx:xx"; - sprintf(a, "%x:%x:%x:%x:%x:%x", + snprintf(a, sizeof a, "%x:%x:%x:%x:%x:%x", e[0], e[1], e[2], e[3], e[4], e[5]); return a; } |