[PATCH] Add explicit NULL check before accessing data pointer
De Cesco, Jonathan
jonathan.de.cesco
Mon Jul 21 02:38:28 PDT 2014
Android private lib for nl80211 driver is sending
wpa_supplicant_event(drv->ctx, EVENT_CHANNEL_LIST_CHANGED, NULL);
For this event, data pointer validity is not checked before access.
Signed-off-by: Jonathan DE CESCO <jonathan.de.cesco at intel.com>
---
wpa_supplicant/events.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 4e84f6e..8cf2dd9 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3369,8 +3369,9 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
wpa_supplicant_set_state(wpa_s, WPA_INTERFACE_DISABLED);
break;
case EVENT_CHANNEL_LIST_CHANGED:
- wpa_supplicant_update_channel_list(
- wpa_s, &data->channel_list_changed);
+ if (data)
+ wpa_supplicant_update_channel_list(
+ wpa_s, &data->channel_list_changed);
break;
case EVENT_INTERFACE_UNAVAILABLE:
wpas_p2p_interface_unavailable(wpa_s);
--
1.7.9.5
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
More information about the Hostap
mailing list