3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +01:00

ie: fix incorrect length check for hotspot indication

The length check was incorrectly assuming that PPS MO ID or
ANQP Domain ID would be present in the IE. Both these are optional
and without then the minimum length is 5 bytes, not 7.
This commit is contained in:
James Prestwood 2019-07-12 15:30:50 -07:00 committed by Denis Kenzior
parent 993d9cbf6b
commit 8bcb8e870e

View File

@ -1287,7 +1287,7 @@ bool is_ie_wfa_ie(const uint8_t *data, uint8_t len, uint8_t oi_type)
if (oi_type == IE_WFA_OI_OSEN && len < 22)
return false;
else if (oi_type == IE_WFA_OI_HS20_INDICATION && len < 7)
else if (oi_type == IE_WFA_OI_HS20_INDICATION && len < 5)
return false;
else if (len < 4) /* OI not handled, but at least check length */
return false;