Skip to content

Commit c48b4f2

Browse files
committed
add missing echX NULL check
1 parent 9b65bc2 commit c48b4f2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/tls.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15255,7 +15255,9 @@ static int TLSX_WriteWithEch(WOLFSSL* ssl, byte* output, byte* semaphore,
1525515255
}
1525615256

1525715257
/* only write if have a shot at acceptance */
15258-
if (ssl->options.echAccepted || ((WOLFSSL_ECH*)echX->data)->innerCount == 0) {
15258+
if (echX != NULL &&
15259+
(ssl->options.echAccepted ||
15260+
((WOLFSSL_ECH*)echX->data)->innerCount == 0)) {
1525915261
if (echX != NULL) {
1526015262
/* turn off and write it last */
1526115263
TURN_OFF(semaphore, TLSX_ToSemaphore(echX->type));

0 commit comments

Comments
 (0)