Skip to content

Commit c1a49fe

Browse files
committed
Fix unreachable code error
1 parent bec87e5 commit c1a49fe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/dtls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,13 @@ static int ParseClientHello(const byte* input, word32 helloSz, WolfSSL_CH* ch,
304304
idx += ReadVector16(input + idx, &ch->extension);
305305
if (idx > helloSz) {
306306
#ifdef WOLFSSL_DTLS_CH_FRAG
307+
idx = helloSz;
307308
/* Allow incomplete extensions if we are parsing a fragment */
308309
if (isFirstCHFrag && extStart < helloSz)
309310
ch->extension.size = helloSz - extStart;
310311
else
311312
#endif
312313
return BUFFER_ERROR;
313-
idx = helloSz;
314314
}
315315
}
316316
if (idx != helloSz)

0 commit comments

Comments
 (0)