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.
This commit is contained in:
Janusz Dziedzic 2011-10-13 01:06:11 +03:00 committed by Jouni Malinen
parent a7fd39bb5d
commit f1afcb391e
1 changed files with 1 additions and 1 deletions

View File

@ -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);