aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/ieee802_11_common.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-04-19 13:35:52 (GMT)
committerJouni Malinen <j@w1.fi>2015-04-22 19:05:11 (GMT)
commite8997b94075f1faa1fda1d4d7bb23b7cd300de11 (patch)
tree3a7887865172b8d187a5c1eb5220fe639d9bde03 /src/common/ieee802_11_common.c
parentf87c99c7874401bd5581b48ccf89a42eba360959 (diff)
downloadhostap-e8997b94075f1faa1fda1d4d7bb23b7cd300de11.zip
hostap-e8997b94075f1faa1fda1d4d7bb23b7cd300de11.tar.gz
hostap-e8997b94075f1faa1fda1d4d7bb23b7cd300de11.tar.bz2
Simplify ERP element parsing
Check the element length in the parser and remove the length field from struct ieee802_11_elems since the only allowed element length is one. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/common/ieee802_11_common.c')
-rw-r--r--src/common/ieee802_11_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c
index 140f920..69ffa8f 100644
--- a/src/common/ieee802_11_common.c
+++ b/src/common/ieee802_11_common.c
@@ -223,8 +223,9 @@ ParseRes ieee802_11_parse_elems(const u8 *start, size_t len,
elems->challenge_len = elen;
break;
case WLAN_EID_ERP_INFO:
+ if (elen < 1)
+ break;
elems->erp_info = pos;
- elems->erp_info_len = elen;
break;
case WLAN_EID_EXT_SUPP_RATES:
elems->ext_supp_rates = pos;