Make copies basic_rates list more useful
Commit e5693c4775
added a copy of the
determined basic rate set into struct hostapd_iface, but did not
actually copy the terminating -1 value. This could be problematic if
something were to actually try to use this list since would be no way to
know what is the last entry in the list. Fix this by copying the
terminating value.
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
ac947e2a83
commit
f0898e9519
1 changed files with 2 additions and 0 deletions
|
@ -129,6 +129,8 @@ int hostapd_prepare_rates(struct hostapd_iface *iface,
|
|||
i = 0;
|
||||
while (basic_rates[i] >= 0)
|
||||
i++;
|
||||
if (i)
|
||||
i++; /* -1 termination */
|
||||
os_free(iface->basic_rates);
|
||||
iface->basic_rates = os_malloc(i * sizeof(int));
|
||||
if (iface->basic_rates)
|
||||
|
|
Loading…
Reference in a new issue