diff mbox series

[v2] P2P: Fix crash during legacy client joining P2P group

Message ID 1526980877-21371-1-git-send-email-g.shyamakshi@samsung.com
State Rejected
Headers show
Series [v2] P2P: Fix crash during legacy client joining P2P group | expand

Commit Message

Shyamakshi Ghosh May 22, 2018, 9:21 a.m. UTC
The peer_addr is missing when a legacy client joins a P2P group.
Ignoring the condition, fixes crash in supplicant.

Signed-off-by: Shyamakshi Ghosh <g.shyamakshi@samsung.com>
---
 wpa_supplicant/dbus/dbus_new.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jouni Malinen May 31, 2018, 10 a.m. UTC | #1
On Tue, May 22, 2018 at 02:51:17PM +0530, Shyamakshi Ghosh wrote:
> The peer_addr is missing when a legacy client joins a P2P group.
> Ignoring the condition, fixes crash in supplicant.

I fixed this years ago:
https://w1.fi/cgit/hostap/commit/?id=11973b268229a754cd930b0a3a7cf5e89202c2aa

Are you really seeing a crash with a current (anything after that fix
from 2014) wpa_supplicant version?
diff mbox series

Patch

diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c
index e0f16bb..3d8da70 100644
--- a/wpa_supplicant/dbus/dbus_new.c
+++ b/wpa_supplicant/dbus/dbus_new.c
@@ -1644,6 +1644,10 @@  void wpas_dbus_signal_p2p_peer_joined(struct wpa_supplicant *wpa_s,
 	if (iface == NULL)
 		return;
 
+	/* Do nothing if peer_addr is missing */
+	if (peer_addr == NULL)
+		return;
+
 	if (!wpa_s->dbus_groupobj_path)
 		return;