From 08da8df45579026339d9cb57ddfbb080e03508cf Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Mon, 31 Jul 2017 16:37:34 -0600 Subject: [PATCH 1/2] sanity check on peer sequence for static analysis report --- src/internal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/internal.c b/src/internal.c index df31227ed..1f750fc32 100755 --- a/src/internal.c +++ b/src/internal.c @@ -9669,14 +9669,14 @@ static INLINE int DtlsCheckWindow(WOLFSSL* ssl) break; } } - - if (peerSeq == NULL) { - WOLFSSL_MSG("Couldn't find that peer ID to check window."); - return 0; - } #endif } + if (peerSeq == NULL) { + WOLFSSL_MSG("Could not find peer sequence"); + return 0; + } + if (ssl->keys.curEpoch == peerSeq->nextEpoch) { next_hi = peerSeq->nextSeq_hi; next_lo = peerSeq->nextSeq_lo; From 01099fd97e6642ea6642056e45ff17562424fc18 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Mon, 31 Jul 2017 16:58:53 -0600 Subject: [PATCH 2/2] cast for when compiling with g++-7 --- src/tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tls.c b/src/tls.c index ffd0e7cf3..222f0d621 100755 --- a/src/tls.c +++ b/src/tls.c @@ -5065,7 +5065,7 @@ static void TLSX_KeyShare_FreeAll(KeyShareEntry* list, void* heap) } else #endif - wc_ecc_free(current->key); + wc_ecc_free((ecc_key*)(current->key)); } XFREE(current->key, heap, DYNAMIC_TYPE_PRIVATE_KEY); XFREE(current->ke, heap, DYNAMIC_TYPE_PUBLIC_KEY);