summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/print-ipsec.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2015-10-11 03:23:28 +0000
committerguenther <guenther@openbsd.org>2015-10-11 03:23:28 +0000
commit3f9f973b14145f7eb8ce199c5b824d07c2acf615 (patch)
tree1f6827557e0487391a104ea9583eb425986b3d1d /usr.sbin/tcpdump/print-ipsec.c
parentDon't allow "rm -rf /" (diff)
downloadwireguard-openbsd-3f9f973b14145f7eb8ce199c5b824d07c2acf615.tar.xz
wireguard-openbsd-3f9f973b14145f7eb8ce199c5b824d07c2acf615.zip
The <ctype.h> is*() interfaces expect EOF or an unsigned char; cast to
(unsigned char) as required found by Michael McConville (mmcconv1 (at) sccs.swarthmore.edu) w/Coccinelle
Diffstat (limited to 'usr.sbin/tcpdump/print-ipsec.c')
-rw-r--r--usr.sbin/tcpdump/print-ipsec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-ipsec.c b/usr.sbin/tcpdump/print-ipsec.c
index 829b3e21dd1..5ca7e6bd77c 100644
--- a/usr.sbin/tcpdump/print-ipsec.c
+++ b/usr.sbin/tcpdump/print-ipsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-ipsec.c,v 1.21 2015/03/29 14:09:29 bluhm Exp $ */
+/* $OpenBSD: print-ipsec.c,v 1.22 2015/10/11 03:23:28 guenther Exp $ */
/*
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
@@ -101,7 +101,8 @@ esp_init (char *espspec)
s[0] = espkey[2*i];
s[1] = espkey[2*i + 1];
s[2] = 0;
- if (!isxdigit(s[0]) || !isxdigit(s[1])) {
+ if (!isxdigit((unsigned char)s[0]) ||
+ !isxdigit((unsigned char)s[1])) {
free(key);
error("espkey must be specified in hex");
}