diff options
| author | 2001-11-07 18:48:16 +0000 | |
|---|---|---|
| committer | 2001-11-07 18:48:16 +0000 | |
| commit | 9f840a032a88dde66ea8f79aaeeba45bc86e04ca (patch) | |
| tree | c9105e6f57b0e6abcaa5129574ba304aa47b8795 /usr.sbin/tcpdump/print-dhcp6.c | |
| parent | avoid buffer overflows. when will people learn to use snprintf correctly (diff) | |
| download | wireguard-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.c | 6 |
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: |
