From 4a0afa19bfb127c5d0e84549f2011938c4f2e519 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 4 Feb 2014 07:36:59 -0800 Subject: [PATCH] Reinitialize the index when processing stored DTLS handshake messages. --- src/internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index e56d49d37..04c516389 100644 --- a/src/internal.c +++ b/src/internal.c @@ -3936,7 +3936,6 @@ static int DtlsMsgDrain(CYASSL* ssl) { DtlsMsg* item = ssl->dtls_msg_list; int ret = 0; - word32 idx = 0; /* While there is an item in the store list, and it is the expected * message, and it is complete, and there hasn't been an error in the @@ -3945,6 +3944,7 @@ static int DtlsMsgDrain(CYASSL* ssl) ssl->keys.dtls_expected_peer_handshake_number == item->seq && item->fragSz == item->sz && ret == 0) { + word32 idx = 0; ssl->keys.dtls_expected_peer_handshake_number++; ret = DoHandShakeMsgType(ssl, item->msg, &idx, item->type, item->sz, item->sz);