diff --git a/src/tls.c b/src/tls.c index f041d16a9..6db110899 100644 --- a/src/tls.c +++ b/src/tls.c @@ -3046,6 +3046,8 @@ static int TLSX_CSR_Parse(WOLFSSL* ssl, byte* input, word16 length, word16 offset = 0; word16 size = 0; + if (length == 0) + return 0; if (length < ENUM_LEN) return BUFFER_ERROR;