]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Fix snprintf buffer length for group ifname backup
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 24 Oct 2013 17:13:32 +0000 (20:13 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 24 Oct 2013 18:22:30 +0000 (21:22 +0300)
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>

wpa_supplicant/p2p_supplicant.c

index 5f5145b44a27a8426e822d4275eae744cb526636..817232b30425e68ef5769182ed7da1b5d2b42add 100644 (file)
@@ -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);
        }
 }