summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmcc <mmcc@openbsd.org>2015-11-07 21:58:05 +0000
committermmcc <mmcc@openbsd.org>2015-11-07 21:58:05 +0000
commitee4d667f903da4060d3c0227fcda8d4d1d38c29b (patch)
tree64f2b5eb2acefaaba65be71697a9232a082b84c5
parentUse linkat() instead of link() so that hardlinks of symlinks work (diff)
downloadwireguard-openbsd-ee4d667f903da4060d3c0227fcda8d4d1d38c29b.tar.xz
wireguard-openbsd-ee4d667f903da4060d3c0227fcda8d4d1d38c29b.zip
Ensure the safety of isprint()'s argument. Suggested by guenther@ a few
weeks ago.
-rw-r--r--usr.sbin/tcpdump/print-decnet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-decnet.c b/usr.sbin/tcpdump/print-decnet.c
index fc60d53f63f..ae3a856de6f 100644
--- a/usr.sbin/tcpdump/print-decnet.c
+++ b/usr.sbin/tcpdump/print-decnet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-decnet.c,v 1.15 2015/10/24 16:32:52 sthen Exp $ */
+/* $OpenBSD: print-decnet.c,v 1.16 2015/11/07 21:58:05 mmcc Exp $ */
/*
* Copyright (c) 1992, 1993, 1994, 1995, 1996, 1997
@@ -888,11 +888,11 @@ dnname_string(u_short dnaddr)
static void
pdata(u_char *dp, u_int maxlen)
{
- char c;
+ int c;
u_int x = maxlen;
while (x-- > 0) {
- c = *dp++;
+ c = (unsigned char)*dp++;
if (isprint(c))
putchar(c);
else