Parcourir la source

Check rx_mgmt::frame more consistently against NULL

If a driver wrapper misbehaves and does not indicate a frame body in the
event, core hostapd code should handle this consistently since that case
was already checked for in one location.

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen il y a 11 ans
Parent
commit
c0333c8dd5
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      src/ap/drv_callbacks.c

+ 2 - 0
src/ap/drv_callbacks.c

@@ -1001,6 +1001,8 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
 		break;
 #endif /* NEED_AP_MLME */
 	case EVENT_RX_MGMT:
+		if (!data->rx_mgmt.frame)
+			break;
 #ifdef NEED_AP_MLME
 		if (hostapd_mgmt_rx(hapd, &data->rx_mgmt) > 0)
 			break;