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>
This commit is contained in:
Jouni Malinen 2014-02-21 13:05:37 +02:00 committed by Jouni Malinen
parent 211d7ab3d8
commit da179bd0e1

View file

@ -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)