mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-11-01 10:57:47 +00:00
hostapd: add missing NULL pointer check on radar notification
Fixes: WIFI-13266 Fixes: WIFI-13265 Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -1958,6 +1958,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);
|
||||
|
||||
@@ -1892,6 +1892,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);
|
||||
|
||||
@@ -1958,6 +1958,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);
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user