WPS: Fix off-by-one check in vendor extension parsing

This commit is contained in:
Jouni Malinen 2011-04-14 20:02:31 +03:00 committed by Jouni Malinen
parent 35530d1472
commit c8d88a145b

View file

@ -121,7 +121,7 @@ static int wps_parse_vendor_ext(struct wps_parse_attr *attr, const u8 *pos,
return -1;
}
if (attr->num_vendor_ext > MAX_WPS_PARSE_VENDOR_EXT) {
if (attr->num_vendor_ext >= MAX_WPS_PARSE_VENDOR_EXT) {
wpa_printf(MSG_DEBUG, "WPS: Skipped Vendor Extension "
"attribute (max %d vendor extensions)",
MAX_WPS_PARSE_VENDOR_EXT);