From 9a0c18c8fa38a1a9c79ca241068eb09ef70f00a4 Mon Sep 17 00:00:00 2001 From: Kareem Date: Tue, 24 Feb 2026 15:19:31 -0700 Subject: [PATCH] Work around error: enumerated and non-enumerated type in conditional expression --- src/internal.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index 3ad961e013..9352af5bd9 100644 --- a/src/internal.c +++ b/src/internal.c @@ -34824,7 +34824,7 @@ exit_scv: #ifdef HAVE_SESSION_TICKET int SetTicket(WOLFSSL* ssl, const byte* ticket, word32 length) { - word32 sessIdLen = (length >= ID_LEN) ? ID_LEN : length; + word32 sessIdLen = 0; if (!HaveUniqueSessionObj(ssl)) return MEMORY_ERROR; @@ -34847,6 +34847,10 @@ int SetTicket(WOLFSSL* ssl, const byte* ticket, word32 length) ssl->session->ticketLen = (word16)length; if (length > 0) { + if (length >= ID_LEN) + sessIdLen = ID_LEN; + else + sessIdLen = length; XMEMCPY(ssl->session->ticket, ticket, length); if (ssl->session_ticket_cb != NULL) { ssl->session_ticket_cb(ssl,