[openwrt/openwrt] hostapd: add missing NULL pointer check on radar notification
LEDE Commits
lede-commits at lists.infradead.org
Tue Jan 9 02:19:55 PST 2024
nbd pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/9cd0023e54adf8b06762c58585b7cb225e5fb2d6
commit 9cd0023e54adf8b06762c58585b7cb225e5fb2d6
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Jan 9 11:05:45 2024 +0100
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 at nbd.name>
(cherry picked from commit d864f68232e910f2c8ab06a66347fc08c257dfcc)
---
package/network/services/hostapd/src/src/ap/ubus.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index 6ff2257c32..66eba99901 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);
More information about the lede-commits
mailing list