Reinitialize the index when processing stored DTLS handshake messages.

This commit is contained in:
John Safranek 2014-02-04 07:36:59 -08:00
parent 468e26a3a2
commit 4a0afa19bf
1 changed files with 1 additions and 1 deletions

View File

@ -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);