From 41c526f35754436e47b27e228b8e659c50cc5e25 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 24 Oct 2013 20:13:32 +0300 Subject: [PATCH] P2P: Fix snprintf buffer length for group ifname backup Commit 2e5ba4b6d14e600d259bbaf59a8fca61dab8f987 moved this to a function and updated one of the os_snprintf() calls to use the len parameter, but forgot the other one. Signed-hostap: Jouni Malinen --- wpa_supplicant/p2p_supplicant.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 5f5145b44..817232b30 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -1175,8 +1175,7 @@ static void wpas_p2p_get_group_ifname(struct wpa_supplicant *wpa_s, if (os_strlen(ifname) >= IFNAMSIZ && os_strlen(wpa_s->ifname) < IFNAMSIZ) { /* Try to avoid going over the IFNAMSIZ length limit */ - os_snprintf(ifname, sizeof(ifname), "p2p-%d", - wpa_s->p2p_group_idx); + os_snprintf(ifname, len, "p2p-%d", wpa_s->p2p_group_idx); } }