summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/print-dhcp6.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2001-11-07 18:48:16 +0000
committerderaadt <deraadt@openbsd.org>2001-11-07 18:48:16 +0000
commit9f840a032a88dde66ea8f79aaeeba45bc86e04ca (patch)
treec9105e6f57b0e6abcaa5129574ba304aa47b8795 /usr.sbin/tcpdump/print-dhcp6.c
parentavoid buffer overflows. when will people learn to use snprintf correctly (diff)
downloadwireguard-openbsd-9f840a032a88dde66ea8f79aaeeba45bc86e04ca.tar.xz
wireguard-openbsd-9f840a032a88dde66ea8f79aaeeba45bc86e04ca.zip
simplify buffer handling; ok ho
Diffstat (limited to 'usr.sbin/tcpdump/print-dhcp6.c')
-rw-r--r--usr.sbin/tcpdump/print-dhcp6.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-dhcp6.c b/usr.sbin/tcpdump/print-dhcp6.c
index f345715b090..4c9a4a87e7f 100644
--- a/usr.sbin/tcpdump/print-dhcp6.c
+++ b/usr.sbin/tcpdump/print-dhcp6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-dhcp6.c,v 1.2 2000/05/05 12:32:09 jakob Exp $ */
+/* $OpenBSD: print-dhcp6.c,v 1.3 2001/11/07 18:48:16 deraadt Exp $ */
/*
* Copyright (C) 1998 and 1999 WIDE Project.
@@ -31,7 +31,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-dhcp6.c,v 1.2 2000/05/05 12:32:09 jakob Exp $";
+ "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-dhcp6.c,v 1.3 2001/11/07 18:48:16 deraadt Exp $";
#endif
#ifdef INET6
@@ -208,7 +208,7 @@ dhcp6ext_print(u_char *cp, u_char *ep)
break;
case OT6_STR:
memset(&buf, 0, sizeof(buf));
- strncpy(buf, &cp[4], len);
+ strlcpy(buf, &cp[4], len);
printf("%s", buf);
break;
case OT6_NUM: