commit 8bcb8e870e3c0824ae8cab8824d0bdf3bb8cb105
parent 993d9cbf6b5cf8eed7b823c4fb6bcbeb32822b41
Author: James Prestwood <james.prestwood@linux.intel.com>
Date: Fri, 12 Jul 2019 15:30:50 -0700
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ie.c b/src/ie.c
@@ -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;