diff options
author | sam <sam@FreeBSD.org> | 2005-06-13 17:07:31 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-06-13 17:07:31 +0000 |
commit | 8637a9a96a3234373c579f38823195a69b770e84 (patch) | |
tree | 0f94fc92605c2c3570cbf9c5d46a01c7fb65bbf6 /contrib/hostapd/wpa.c | |
parent | ef42ed26e06c009171784bf0997f11217b9834eb (diff) | |
download | FreeBSD-src-8637a9a96a3234373c579f38823195a69b770e84.zip FreeBSD-src-8637a9a96a3234373c579f38823195a69b770e84.tar.gz |
resolve merge conflicts
Approved by: re (dwhite)
Diffstat (limited to 'contrib/hostapd/wpa.c')
-rw-r--r-- | contrib/hostapd/wpa.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/hostapd/wpa.c b/contrib/hostapd/wpa.c index e357a85..c0948e8 100644 --- a/contrib/hostapd/wpa.c +++ b/contrib/hostapd/wpa.c @@ -1416,6 +1416,14 @@ void wpa_receive(struct hostapd_data *hapd, struct sta_info *sta, key = (struct wpa_eapol_key *) (hdr + 1); key_info = ntohs(key->key_info); key_data_length = ntohs(key->key_data_length); + if (key_data_length > data_len - sizeof(*hdr) - sizeof(*key)) { + wpa_printf(MSG_INFO, "WPA: Invalid EAPOL-Key frame - " + "key_data overflow (%d > %lu)", + key_data_length, + (unsigned long) (data_len - sizeof(*hdr) - + sizeof(*key))); + return; + } /* FIX: verify that the EAPOL-Key frame was encrypted if pairwise keys * are set */ |