Browse Source

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 <jouni@qca.qualcomm.com>
Jouni Malinen 11 years ago
parent
commit
41c526f357
1 changed files with 1 additions and 2 deletions
  1. 1 2
      wpa_supplicant/p2p_supplicant.c

+ 1 - 2
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);
 	}
 }