From 62851b9e4718e8ebcf3da7931e6411dc7c7ccfd3 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Tue, 22 Jan 2019 07:16:44 +0100 Subject: [PATCH] unit: Fix usage of sizeof(struct eapol_key) in test-eapol --- unit/test-eapol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unit/test-eapol.c b/unit/test-eapol.c index 74a1017a..b5b0a2c2 100644 --- a/unit/test-eapol.c +++ b/unit/test-eapol.c @@ -2912,7 +2912,7 @@ static void eapol_sm_test_tls(struct eapol_8021x_tls_test_state *s, __eapol_set_tx_user_data(s); r = handshake_state_set_supplicant_wpa(hs, - eapol_key_data_14 + sizeof(struct eapol_key)); + eapol_key_data_14 + EAPOL_FRAME_LEN(16)); assert(r); handshake_state_set_authenticator_wpa(hs, ap_wpa_ie); @@ -3286,7 +3286,7 @@ static void eapol_sm_test_eap_nak(const void *data) __eapol_set_tx_user_data(&s); r = handshake_state_set_supplicant_wpa(hs, - eapol_key_data_20 + sizeof(struct eapol_key)); + eapol_key_data_20 + EAPOL_FRAME_LEN(16)); assert(r); handshake_state_set_authenticator_wpa(hs, ap_wpa_ie);