aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2014-02-21 11:05:37 (GMT)
committerJouni Malinen <j@w1.fi>2014-02-21 11:08:08 (GMT)
commitda179bd0e12d6a7b1e5f85a3bec5d1b6ec3c8e1f (patch)
treef4ebf3009e8609ee31a0b0346c51784d9211097c /src/wps
parent211d7ab3d8d0ddce8d512dd32250baa1bfea0c6b (diff)
downloadhostap-da179bd0e12d6a7b1e5f85a3bec5d1b6ec3c8e1f.zip
hostap-da179bd0e12d6a7b1e5f85a3bec5d1b6ec3c8e1f.tar.gz
hostap-da179bd0e12d6a7b1e5f85a3bec5d1b6ec3c8e1f.tar.bz2
WPS: Fix parsing of 0-length WFA vendor extension subelement
The previous parser would have skipped a WFA vendor extension attribute that includes only a single zero-length subelement. No such subelement has been defined so far, so this does not really affect any functionality, but better make the parser address this correctly should such an element ever be added. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/wps')
-rw-r--r--src/wps/wps_attr_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wps/wps_attr_parse.c b/src/wps/wps_attr_parse.c
index b04c222..1ebcfe9 100644
--- a/src/wps/wps_attr_parse.c
+++ b/src/wps/wps_attr_parse.c
@@ -75,7 +75,7 @@ static int wps_parse_vendor_ext_wfa(struct wps_parse_attr *attr, const u8 *pos,
const u8 *end = pos + len;
u8 id, elen;
- while (pos + 2 < end) {
+ while (pos + 2 <= end) {
id = *pos++;
elen = *pos++;
if (pos + elen > end)