520-fix_wps_pin_crash.patch 245 B

123456789101112
  1. --- a/hostapd/ctrl_iface.c
  2. +++ b/hostapd/ctrl_iface.c
  3. @@ -343,6 +343,9 @@ static int hostapd_ctrl_iface_wps_ap_pin
  4. char *pos;
  5. const char *pin_txt;
  6. + if (!hapd->wps)
  7. + return -1;
  8. +
  9. pos = os_strchr(txt, ' ');
  10. if (pos)
  11. *pos++ = '\0';