From 0c21d76ce321fdb0494995263d989c3ac60f26a9 Mon Sep 17 00:00:00 2001 From: toddouska Date: Thu, 8 Sep 2016 12:06:22 -0700 Subject: [PATCH] detect client not sending any compression types --- src/internal.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/internal.c b/src/internal.c index 80cb9f9ef..d134b9aaf 100755 --- a/src/internal.c +++ b/src/internal.c @@ -18032,6 +18032,11 @@ int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, if ((i - begin) + b > helloSz) return BUFFER_ERROR; + if (b == 0) { + WOLFSSL_MSG("No compression types in list"); + return COMPRESSION_ERROR; + } + #ifdef WOLFSSL_DTLS if (IsDtlsNotSctpMode(ssl)) { byte newCookie[MAX_COOKIE_LEN];