diff options
author | Janusz Dziedzic <janusz.dziedzic@tieto.com> | 2011-10-13 01:06:11 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-10-13 01:06:11 +0300 |
commit | f1afcb391e4e514a2dcdb5167f7acdfb13b07db1 (patch) | |
tree | b9e583a76fc4ccc5ea1e469fdcfbd614b1258444 /src/p2p | |
parent | a7fd39bb5d422d7bd3135ad965e97d2c1991e3ff (diff) | |
download | external_wpa_supplicant_8_ti-f1afcb391e4e514a2dcdb5167f7acdfb13b07db1.zip external_wpa_supplicant_8_ti-f1afcb391e4e514a2dcdb5167f7acdfb13b07db1.tar.gz external_wpa_supplicant_8_ti-f1afcb391e4e514a2dcdb5167f7acdfb13b07db1.tar.bz2 |
P2P: Fix wpabuf reuse on p2p_group_notif_noa()
This currently unused function would have triggered wpabuf overflows
due to incorrect variable being reset to zero in the case the old
NoA wpabuf was large enough for the new data.
Diffstat (limited to 'src/p2p')
-rw-r--r-- | src/p2p/p2p_group.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/p2p/p2p_group.c b/src/p2p/p2p_group.c index 14a475d..cc2542d 100644 --- a/src/p2p/p2p_group.c +++ b/src/p2p/p2p_group.c @@ -494,7 +494,7 @@ int p2p_group_notif_noa(struct p2p_group *group, const u8 *noa, } else { if (group->noa) { if (wpabuf_size(group->noa) >= noa_len) { - group->noa->size = 0; + group->noa->used = 0; wpabuf_put_data(group->noa, noa, noa_len); } else { wpabuf_free(group->noa); |