]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EAP-AKA server: Avoid void pointer arithmetic
authorJouni Malinen <jouni@codeaurora.org>
Wed, 24 Jul 2019 16:34:11 +0000 (19:34 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 24 Jul 2019 16:34:11 +0000 (19:34 +0300)
This is a compiler specific extension and not compliant with the C
standard.

Fixes: 5eefa8115b88 ("EAP-AKA: Add Session-Id derivation during fast-reauth")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/eap_server/eap_server_aka.c

index 1f3884e36ac4def70574136ff21c1fc432d2f69e..e145a12a5a2355d9350563a986ca9a17c30b0cc3 100644 (file)
@@ -589,7 +589,7 @@ static struct wpabuf * eap_aka_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;