]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Use proper cmd length in fetching STA list
authorJouni Malinen <j@w1.fi>
Sat, 20 Nov 2010 10:43:16 +0000 (12:43 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 20 Nov 2010 10:43:16 +0000 (12:43 +0200)
wlantest/wlantest_cli.c

index 27f2e7e6af485b7d216b22cb9fcd461780a143af..8191bdaa4cf60b58e2da96e6819e41973a44fa42 100644 (file)
@@ -206,7 +206,7 @@ static char ** get_sta_list(int s, const u8 *bssid, int add_bcast)
        pos = attr_hdr_add(pos, end, WLANTEST_ATTR_BSSID, ETH_ALEN);
        os_memcpy(pos, bssid, ETH_ALEN);
        pos += ETH_ALEN;
-       rlen = cmd_send_and_recv(s, buf, sizeof(buf), resp, sizeof(resp));
+       rlen = cmd_send_and_recv(s, buf, pos - buf, resp, sizeof(resp));
        if (rlen < 0)
                return NULL;