summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhshoexer <hshoexer@openbsd.org>2004-10-07 09:50:48 +0000
committerhshoexer <hshoexer@openbsd.org>2004-10-07 09:50:48 +0000
commit96482ef4df226f71ed9d513f760c4229e9b9e66c (patch)
tree5cf7bc43dafda791d7c639efb48108ffeb00e5a1
parentintroduce -p option and p command to only show a single process. (diff)
downloadwireguard-openbsd-96482ef4df226f71ed9d513f760c4229e9b9e66c.tar.xz
wireguard-openbsd-96482ef4df226f71ed9d513f760c4229e9b9e66c.zip
When printing attributes do not cast unsigned value to signed.
ok & help otto ok deraadt henning markus
-rw-r--r--usr.sbin/tcpdump/print-ike.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-ike.c b/usr.sbin/tcpdump/print-ike.c
index c4f10c0f8c5..39da1fb36b7 100644
--- a/usr.sbin/tcpdump/print-ike.c
+++ b/usr.sbin/tcpdump/print-ike.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-ike.c,v 1.25 2004/07/29 10:29:44 ho Exp $ */
+/* $OpenBSD: print-ike.c,v 1.26 2004/10/07 09:50:48 hshoexer Exp $ */
/*
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
@@ -29,7 +29,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-ike.c,v 1.25 2004/07/29 10:29:44 ho Exp $ (XXX)";
+ "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-ike.c,v 1.26 2004/10/07 09:50:48 hshoexer Exp $ (XXX)";
#endif
#include <sys/param.h>
@@ -333,7 +333,7 @@ ike_attribute_print (u_int8_t *buf, u_int8_t doi, int maxlen)
if (af == 0) {
/* AF=0; print the variable length attribute value */
for (val = 0; val < len; val++)
- printf("%02x", (char)*(buf + 4 + val));
+ printf("%02x", *(buf + 4 + val));
return len + 4;
}