From: Jouni Malinen Date: Wed, 13 Apr 2011 19:03:52 +0000 (+0300) Subject: P2P: Clear go_dev_addr for group started events if it is not known X-Git-Tag: hostap-1-bp~418 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62c0d27ed313be1ed0ea178ca3d059ff97cd7ba5;p=thirdparty%2Fhostap.git P2P: Clear go_dev_addr for group started events if it is not known Better make sure the address value included in the event message gets cleared in case the GO Device Address is not known for some reason. Previously, this could potentially have been some random data from stack should we ever hit the case where wpa_s->current_ssid is not set (which should not really happen in normal use cases). --- diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index cfa651001..3970dc40b 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -494,6 +494,7 @@ static void wpas_group_formation_completed(struct wpa_supplicant *wpa_s, ssid_txt = ""; client = wpa_s->p2p_group_interface == P2P_GROUP_INTERFACE_CLIENT; + os_memset(go_dev_addr, 0, ETH_ALEN); } wpa_s->show_group_started = 0;