]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Fix cross connection allowed parser to use correct field
authorJouni Malinen <jouni.malinen@atheros.com>
Mon, 2 Aug 2010 23:02:18 +0000 (16:02 -0700)
committerJouni Malinen <j@w1.fi>
Thu, 9 Sep 2010 14:17:22 +0000 (07:17 -0700)
The previous version had a bug that could result in NULL pointer
dereference if the P2P IE included Manageability attribute, but no
Capability attribute.

src/p2p/p2p_parse.c

index b82848e49023eb9407a01826c9ef01aef42ed909..bbd727ab9bcb806de1b4a3938c9e775c48177708 100644 (file)
@@ -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);
 }