[PATCH] wpa_supplicant: prevent segmentation fault in p2p_group_match_dev_type.

David Spinadel dvdspndl at gmail.com
Thu Mar 7 04:09:38 EST 2013


From: David Spinadel <david.spinadel at intel.com>

Add nullity check in p2p_group_match_dev_type().

Signed-off-by: David Spinadel <david.spinadel at intel.com>
---
 src/p2p/p2p_group.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/p2p/p2p_group.c b/src/p2p/p2p_group.c
index 9559e44..bb26d4a 100644
--- a/src/p2p/p2p_group.c
+++ b/src/p2p/p2p_group.c
@@ -706,6 +706,9 @@ int p2p_group_match_dev_type(struct p2p_group *group, struct wpabuf *wps)
 {
 	struct p2p_group_member *m;
 
+	if (group == NULL)
+		return 0;
+
 	if (p2p_match_dev_type(group->p2p, wps))
 		return 1; /* Match with own device type */
 
-- 
1.7.10.msysgit.1



More information about the HostAP mailing list