mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-24 07:46:48 +00:00
hostapd: fix a crash corner case
On some setup failures, iface->bss can be NULL
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 1ee5b7e506
)
Link: https://github.com/openwrt/openwrt/pull/15898
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
dee4309bdf
commit
d0c7b19db8
@ -51,7 +51,7 @@ hostapd_ucode_update_bss_list(struct hostapd_iface *iface, uc_value_t *if_bss, u
|
||||
int i;
|
||||
|
||||
list = ucv_array_new(vm);
|
||||
for (i = 0; i < iface->num_bss; i++) {
|
||||
for (i = 0; iface->bss && i < iface->num_bss; i++) {
|
||||
struct hostapd_data *hapd = iface->bss[i];
|
||||
uc_value_t *val = hostapd_ucode_bss_get_uval(hapd);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user