We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36328e3 commit b43fb41Copy full SHA for b43fb41
1 file changed
src/tls13.c
@@ -12166,7 +12166,7 @@ static int SendTls13NewSessionTicket(WOLFSSL* ssl)
12166
/* Nonce */
12167
length += TICKET_NONCE_LEN_SZ + DEF_TICKET_NONCE_SZ;
12168
12169
- sendSz = (word16)(idx + length + MAX_MSG_EXTRA);
+ sendSz = (int)(idx + length + MAX_MSG_EXTRA);
12170
12171
/* Check buffers are big enough and grow if needed. */
12172
if ((ret = CheckAvailableSize(ssl, sendSz)) != 0)
@@ -12222,7 +12222,8 @@ static int SendTls13NewSessionTicket(WOLFSSL* ssl)
12222
idx += EXTS_SZ;
12223
#endif
12224
12225
- if (idx > WOLFSSL_MAX_16BIT) {
+ if (idx > WOLFSSL_MAX_16BIT ||
12226
+ sendSz > (int)WOLFSSL_MAX_16BIT) {
12227
return BAD_LENGTH_E;
12228
}
12229
0 commit comments