summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2015-07-16 23:34:54 +0000
committersthen <sthen@openbsd.org>2015-07-16 23:34:54 +0000
commit958b7e4553aac12efed7c12a35c4fbca10eb3f33 (patch)
tree48313dd0b10b0d5ab9dd91ebe1eb7a627c21026d
parentWhen incrementing msg, decrement msglen. Otherwise too much data (diff)
downloadwireguard-openbsd-958b7e4553aac12efed7c12a35c4fbca10eb3f33.tar.xz
wireguard-openbsd-958b7e4553aac12efed7c12a35c4fbca10eb3f33.zip
add missing ELEM_CHECK for csa printing, spotted by / ok stsp@
-rw-r--r--usr.sbin/tcpdump/print-802_11.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/tcpdump/print-802_11.c b/usr.sbin/tcpdump/print-802_11.c
index 848c70f5813..3256adc6b8d 100644
--- a/usr.sbin/tcpdump/print-802_11.c
+++ b/usr.sbin/tcpdump/print-802_11.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-802_11.c,v 1.19 2015/07/16 20:57:13 stsp Exp $ */
+/* $OpenBSD: print-802_11.c,v 1.20 2015/07/16 23:34:54 sthen Exp $ */
/*
* Copyright (c) 2005 Reyk Floeter <reyk@openbsd.org>
@@ -401,6 +401,7 @@ ieee80211_elements(struct ieee80211_frame *wh, u_int flen)
ieee80211_print_element(data, len);
break;
case IEEE80211_ELEMID_CSA:
+ ELEM_CHECK(3);
printf(", csa (chan %u count %u%s)", data[1], data[2],
(data[0] == 1) ? " noTX" : "");
break;