Skip to content

Commit 110f5cb

Browse files
committed
Fix ECH error code: use BUFFER_ERROR for malformed peer input
Change innerClientHelloLen underflow guard in TLSX_ECH_Parse from BAD_FUNC_ARG to BUFFER_ERROR to match the convention used throughout tls.c for wire-protocol length/bounds validation.
1 parent 599eec6 commit 110f5cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13606,7 +13606,7 @@ static int TLSX_ECH_Parse(WOLFSSL* ssl, const byte* readBuf, word16 size,
1360613606
/* read hello inner len */
1360713607
ato16(readBuf_p, &ech->innerClientHelloLen);
1360813608
if (ech->innerClientHelloLen < WC_AES_BLOCK_SIZE) {
13609-
return BAD_FUNC_ARG;
13609+
return BUFFER_ERROR;
1361013610
}
1361113611
ech->innerClientHelloLen -= WC_AES_BLOCK_SIZE;
1361213612
readBuf_p += 2;

0 commit comments

Comments
 (0)