aboutsummaryrefslogtreecommitdiffstats
path: root/package/hostapd/patches/520-fix_wps_pin_crash.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/hostapd/patches/520-fix_wps_pin_crash.patch')
-rw-r--r--package/hostapd/patches/520-fix_wps_pin_crash.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/package/hostapd/patches/520-fix_wps_pin_crash.patch b/package/hostapd/patches/520-fix_wps_pin_crash.patch
new file mode 100644
index 000000000..29d154cef
--- /dev/null
+++ b/package/hostapd/patches/520-fix_wps_pin_crash.patch
@@ -0,0 +1,12 @@
+--- a/hostapd/ctrl_iface.c
++++ b/hostapd/ctrl_iface.c
+@@ -450,6 +450,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';