diff options
| author | Felix Fietkau <nbd@nbd.name> | 2024-01-09 11:05:45 +0100 |
|---|---|---|
| committer | Felix Fietkau <nbd@nbd.name> | 2024-01-09 11:06:24 +0100 |
| commit | d864f68232e910f2c8ab06a66347fc08c257dfcc (patch) | |
| tree | a543a388bc3241e2d7fcb7bd7c89d4c8a36d0839 /package/network/services/hostapd/src | |
| parent | 32d2443476188f880395e52e0216c84dce9670f8 (diff) | |
| download | upstream-d864f68232e910f2c8ab06a66347fc08c257dfcc.tar.gz upstream-d864f68232e910f2c8ab06a66347fc08c257dfcc.tar.bz2 upstream-d864f68232e910f2c8ab06a66347fc08c257dfcc.zip | |
hostapd: add missing NULL pointer check on radar notification
Fixes a race condition that can lead to a hostapd crash
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/network/services/hostapd/src')
| -rw-r--r-- | package/network/services/hostapd/src/src/ap/ubus.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c index 6ff2257c329..66eba999017 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.c +++ b/package/network/services/hostapd/src/src/ap/ubus.c @@ -1907,6 +1907,9 @@ void hostapd_ubus_notify_radar_detected(struct hostapd_iface *iface, int frequen struct hostapd_data *hapd; int i; + if (!ctx) + return; + blob_buf_init(&b, 0); blobmsg_add_u16(&b, "frequency", frequency); blobmsg_add_u16(&b, "width", chan_width); |
