From c1a49fef9925379ecdc4e2e7ab659ca36f8b5348 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Mon, 11 Sep 2023 17:17:19 +0200 Subject: [PATCH] Fix unreachable code error --- src/dtls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dtls.c b/src/dtls.c index 30af15c69..9475bd2ed 100644 --- a/src/dtls.c +++ b/src/dtls.c @@ -304,13 +304,13 @@ static int ParseClientHello(const byte* input, word32 helloSz, WolfSSL_CH* ch, idx += ReadVector16(input + idx, &ch->extension); if (idx > helloSz) { #ifdef WOLFSSL_DTLS_CH_FRAG + idx = helloSz; /* Allow incomplete extensions if we are parsing a fragment */ if (isFirstCHFrag && extStart < helloSz) ch->extension.size = helloSz - extStart; else #endif return BUFFER_ERROR; - idx = helloSz; } } if (idx != helloSz)