Merge pull request #6436 from lealem47/sanitizer

Miscellaneous fixes for sanitizer
This commit is contained in:
Sean Parkinson
2023-06-06 11:55:52 +10:00
committed by GitHub
4 changed files with 16 additions and 6 deletions

View File

@@ -15958,6 +15958,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);
}