Browse Source

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

Jouni Malinen 14 years ago
parent
commit
c8d88a145b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/wps/wps_attr_parse.c

+ 1 - 1
src/wps/wps_attr_parse.c

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