From 96aa65837514662224c0f556bd4ffb2093a92976 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 16 Oct 2019 15:29:53 -0700 Subject: [PATCH] sae: check return getting k_point --- src/sae.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sae.c b/src/sae.c index 8f9425f1..232a63b9 100644 --- a/src/sae.c +++ b/src/sae.c @@ -498,6 +498,9 @@ static int sae_process_commit(struct sae_sm *sm, const uint8_t *from, l_ecc_point_free(k_point); + if (klen < 0) + goto reject; + /* keyseed = H(<0>32, k) */ hmac_sha256(zero_key, 32, k, klen, keyseed, 32);