Files
wlan-ap/patches/0073-hostapd-add-missing-NULL-pointer-check-on-radar-noti.patch
John Crispin f21fa9ab80 hostapd: add missing NULL pointer check on radar notification
Fixes: WIFI-13266
Fixes: WIFI-13265
Signed-off-by: John Crispin <john@phrozen.org>
2024-01-23 17:27:49 +01:00

28 lines
933 B
Diff

From 20bf17b6bb9c40a14db5ed9744c3362afe4a67d8 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 9 Jan 2024 12:36:01 +0100
Subject: [PATCH] hostapd: add missing NULL pointer check on radar notification
Signed-off-by: John Crispin <john@phrozen.org>
---
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 52f83c50f7..54361ea460 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -2125,6 +2125,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);
--
2.34.1