From fe2e1edf431dddd299a87d74d65de12f20a25bf7 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 24 Jul 2019 19:35:14 +0300 Subject: [PATCH] EAP-SIM server: Avoid void pointer arithmetic This is a compiler specific extension and not compliant with the C standard. Fixes: 1c16b257a081 ("EAP-SIM: Add Session-Id derivation during fast-reauth") Signed-off-by: Jouni Malinen --- src/eap_server/eap_server_sim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eap_server/eap_server_sim.c b/src/eap_server/eap_server_sim.c index 66a087212..f8aa508ec 100644 --- a/src/eap_server/eap_server_sim.c +++ b/src/eap_server/eap_server_sim.c @@ -286,7 +286,7 @@ static struct wpabuf * eap_sim_build_reauth(struct eap_sm *sm, * Session-Id calculation after receiving response from the peer and * after all other checks pass. */ os_memcpy(data->reauth_mac, - wpabuf_head(buf) + wpabuf_len(buf) - EAP_SIM_MAC_LEN, + wpabuf_head_u8(buf) + wpabuf_len(buf) - EAP_SIM_MAC_LEN, EAP_SIM_MAC_LEN); return buf;