diff options
author | Jouni Malinen <j@w1.fi> | 2012-09-07 00:15:53 +0300 |
---|---|---|
committer | Arik Nemtsov <arik@wizery.com> | 2012-09-07 06:53:24 +0300 |
commit | c820dd239e664ab3403c9cd69b6ca51a21b09f8e (patch) | |
tree | 28be95ea86d3e7089cd8a3fbc015b9fbf743ade7 | |
parent | 58a188a9a8e3b453306b46e06cdbced6d50107d3 (diff) | |
download | external_wpa_supplicant_8_ti-c820dd239e664ab3403c9cd69b6ca51a21b09f8e.zip external_wpa_supplicant_8_ti-c820dd239e664ab3403c9cd69b6ca51a21b09f8e.tar.gz external_wpa_supplicant_8_ti-c820dd239e664ab3403c9cd69b6ca51a21b09f8e.tar.bz2 |
Make copies basic_rates list more useful
Commit e5693c4775bae65faa960f80889f98b0a6cb2e1c 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>
-rw-r--r-- | src/ap/hw_features.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c index 76c4211..0900e78 100644 --- a/src/ap/hw_features.c +++ b/src/ap/hw_features.c @@ -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) |