From: Jouni Malinen Date: Sat, 20 Nov 2010 10:43:16 +0000 (+0200) Subject: wlantest: Use proper cmd length in fetching STA list X-Git-Tag: hostap-1-bp~779 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0954399c90df11c2cb11bdb03c2bc9e04a3e61b4;p=thirdparty%2Fhostap.git wlantest: Use proper cmd length in fetching STA list --- diff --git a/wlantest/wlantest_cli.c b/wlantest/wlantest_cli.c index 27f2e7e6a..8191bdaa4 100644 --- a/wlantest/wlantest_cli.c +++ b/wlantest/wlantest_cli.c @@ -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;