Miscellaneous fixes for sanitizer

This commit is contained in:
Lealem Amedie
2023-05-23 13:51:46 -06:00
parent 9d01411857
commit 5613109fae
4 changed files with 16 additions and 6 deletions

View File

@@ -15951,6 +15951,12 @@ static int DoHandShakeMsg(WOLFSSL* ssl, byte* input, word32* inOutIdx,
return PARSE_ERROR;
}
if (size > MAX_HANDSHAKE_SZ) {
WOLFSSL_MSG("Handshake message too large");
WOLFSSL_ERROR_VERBOSE(HANDSHAKE_SIZE_ERROR);
return HANDSHAKE_SIZE_ERROR;
}
return DoHandShakeMsgType(ssl, input, inOutIdx, type, size, totalSz);
}