mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-17 18:34:03 -05:00
Fix basic_rates copying
Commit e5693c4775
used incorrect
sizeof to copy the basic rates.
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
210ff0f7f3
commit
78018ae91d
@ -130,9 +130,9 @@ int hostapd_prepare_rates(struct hostapd_iface *iface,
|
||||
while (basic_rates[i] >= 0)
|
||||
i++;
|
||||
os_free(iface->basic_rates);
|
||||
iface->basic_rates = os_malloc(i * sizeof(int *));
|
||||
iface->basic_rates = os_malloc(i * sizeof(int));
|
||||
if (iface->basic_rates)
|
||||
os_memcpy(iface->basic_rates, basic_rates, i * sizeof(int *));
|
||||
os_memcpy(iface->basic_rates, basic_rates, i * sizeof(int));
|
||||
|
||||
os_free(iface->current_rates);
|
||||
iface->num_rates = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user