From bb2be272aea715832504b7d507f261260e8ae942 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Wed, 6 May 2015 01:48:39 +0200 Subject: [PATCH] unit: Assert eapol_key_validate is valid first Before running eapol_verify_ptk_2_of_4, assert that eapol_key_validate did not return NULL. --- unit/test-eapol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unit/test-eapol.c b/unit/test-eapol.c index 07976568..641f610b 100644 --- a/unit/test-eapol.c +++ b/unit/test-eapol.c @@ -504,8 +504,8 @@ static void eapol_4way_test(const void *data) step2 = eapol_key_validate(eapol_key_data_4, sizeof(eapol_key_data_4)); - assert(eapol_verify_ptk_2_of_4(step2)); assert(step2); + assert(eapol_verify_ptk_2_of_4(step2)); memcpy(snonce, step2->key_nonce, sizeof(step2->key_nonce)); assert(!crypto_psk_from_passphrase(passphrase, (uint8_t *) ssid,