aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/wpa_common.h
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-06-05 14:50:53 (GMT)
committerJouni Malinen <j@w1.fi>2008-06-05 14:50:53 (GMT)
commit4fba48a5a7d367e86cdd29b6f004dcdb63e6b279 (patch)
tree0f4f174badfcf33f79df23c62f7c9220cf104376 /src/common/wpa_common.h
parent1d3c75b3b6663ed9f3a9a8dea8d47056cce2680f (diff)
downloadhostap-4fba48a5a7d367e86cdd29b6f004dcdb63e6b279.zip
hostap-4fba48a5a7d367e86cdd29b6f004dcdb63e6b279.tar.gz
hostap-4fba48a5a7d367e86cdd29b6f004dcdb63e6b279.tar.bz2
Silence compiler warnings about out of array bounds indexes
struct wpa_ie_hdr had separate fields for 24-bit OUI and 8-bit oui_type for WPA/RSN selectors. {WPA,RSN}_SELECTOR_{GET,PUT} access these four octets through oui and the "out-of-bounds" access for the fourth octet is actually reading/writing oui_type. This works fine, but some tools complain about the array bounds "failure". Since oui_type is never accessed separately, the simplest fix is to just combine these into a single 4-octet field.
Diffstat (limited to 'src/common/wpa_common.h')
-rw-r--r--src/common/wpa_common.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
index 936df73..9b9e39e 100644
--- a/src/common/wpa_common.h
+++ b/src/common/wpa_common.h
@@ -188,8 +188,7 @@ struct wpa_ptk {
struct wpa_ie_hdr {
u8 elem_id;
u8 len;
- u8 oui[3];
- u8 oui_type;
+ u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */
u8 version[2]; /* little endian */
} STRUCT_PACKED;