From c0210491d9db975365762bb9402a2b88f0604d93 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 13 Oct 2015 14:21:39 -0700 Subject: [PATCH] don't try to defragment handshake messages outside the handshake --- src/internal.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/internal.c b/src/internal.c index 14c77f86f..4265caf7e 100644 --- a/src/internal.c +++ b/src/internal.c @@ -5272,6 +5272,16 @@ static int DoHandShakeMsg(WOLFSSL* ssl, byte* input, word32* inOutIdx, WOLFSSL_ENTER("DoHandShakeMsg()"); + if (ssl->arrays == NULL) { + byte type; + word32 size; + + if (GetHandShakeHeader(ssl,input,inOutIdx,&type, &size, totalSz) != 0) + return PARSE_ERROR; + + return DoHandShakeMsgType(ssl, input, inOutIdx, type, size, totalSz); + } + inputLength = ssl->buffers.inputBuffer.length - *inOutIdx; /* If there is a pending fragmented handshake message,