aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/patches/520-fix_wps_pin_crash.patch
blob: 80d562c8c264b547af00b04dd695ae46d7263d0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -479,6 +479,9 @@ static int hostapd_ctrl_iface_wps_ap_pin
 	char *pos;
 	const char *pin_txt;
 
+	if (!hapd->wps)
+		return -1;
+
 	pos = os_strchr(txt, ' ');
 	if (pos)
 		*pos++ = '\0';