]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Use WPS_SEC_DEV_TYPE_MAX_LEN in P2P array definition
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 7 Apr 2015 13:06:43 +0000 (16:06 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 22 Apr 2015 08:44:19 +0000 (11:44 +0300)
This makes it more obvious that the wps_parse_msg() bounds checking is
used to verify that there is sufficient space in the P2P buffer for the
secondary device types.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/p2p/p2p.h

index 2a6b811b6dc82fc3c5b4f6703642cd7cd286d707..481ecacadbbae9b29a67fd59d2fb35d7c15b52d3 100644 (file)
@@ -10,7 +10,7 @@
 #define P2P_H
 
 #include "common/ieee802_11_defs.h"
-#include "wps/wps_defs.h"
+#include "wps/wps.h"
 
 /* P2P ASP Setup Capability */
 #define P2PS_SETUP_NONE 0
@@ -317,7 +317,7 @@ struct p2p_peer_info {
         * This list includes from 0 to 16 Secondary Device Types as indicated
         * by wps_sec_dev_type_list_len (8 * number of types).
         */
-       u8 wps_sec_dev_type_list[128];
+       u8 wps_sec_dev_type_list[WPS_SEC_DEV_TYPE_MAX_LEN];
 
        /**
         * wps_sec_dev_type_list_len - Length of secondary device type list