[WLAN] : Fix crash for NULL pointer handling

Manish BANSAL manish-ste.bansal
Tue Jul 3 03:03:40 PDT 2012


Hello,

This patch add NULL check before passing the parameter to function wpa_supplicant_wps_event_er_set_sel_reg().

================================================================
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 222c8fc..75631e1 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -656,7 +656,8 @@ static void wpa_supplicant_wps_event(void *ctx, enum wps_event event,
                                                        &data->ap_settings);
                break;
        case WPS_EV_ER_SET_SELECTED_REGISTRAR:
-               wpa_supplicant_wps_event_er_set_sel_reg(wpa_s,
+               if (data)
+                       wpa_supplicant_wps_event_er_set_sel_reg(wpa_s,
                                                        &data->set_sel_reg);
                break;
        }
=====================================================================

Regards,
Manish Bansal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20120703/1f538025/attachment-0001.htm 



More information about the Hostap mailing list