From: Jouni Malinen Date: Mon, 2 Aug 2010 23:02:18 +0000 (-0700) Subject: P2P: Fix cross connection allowed parser to use correct field X-Git-Tag: hostap-1-bp~1074 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6125c661d5b52bd12a30258167d65ac23e94017a;p=thirdparty%2Fhostap.git P2P: Fix cross connection allowed parser to use correct field The previous version had a bug that could result in NULL pointer dereference if the P2P IE included Manageability attribute, but no Capability attribute. --- diff --git a/src/p2p/p2p_parse.c b/src/p2p/p2p_parse.c index b82848e49..bbd727ab9 100644 --- a/src/p2p/p2p_parse.c +++ b/src/p2p/p2p_parse.c @@ -661,7 +661,7 @@ int p2p_get_cross_connect_disallowed(const struct wpabuf *p2p_ie) if (!msg.manageability) return 0; - return !(msg.capability[0] & P2P_MAN_CROSS_CONNECTIION_PERMITTED); + return !(msg.manageability[0] & P2P_MAN_CROSS_CONNECTIION_PERMITTED); }