We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 80ba723 + b43fb41 commit e5594a6Copy full SHA for e5594a6
1 file changed
src/tls13.c
@@ -12321,7 +12321,7 @@ static int SendTls13NewSessionTicket(WOLFSSL* ssl)
12321
/* Nonce */
12322
length += TICKET_NONCE_LEN_SZ + DEF_TICKET_NONCE_SZ;
12323
12324
- sendSz = (word16)(idx + length + MAX_MSG_EXTRA);
+ sendSz = (int)(idx + length + MAX_MSG_EXTRA);
12325
12326
/* Check buffers are big enough and grow if needed. */
12327
if ((ret = CheckAvailableSize(ssl, sendSz)) != 0)
@@ -12377,7 +12377,8 @@ static int SendTls13NewSessionTicket(WOLFSSL* ssl)
12377
idx += EXTS_SZ;
12378
#endif
12379
12380
- if (idx > WOLFSSL_MAX_16BIT) {
+ if (idx > WOLFSSL_MAX_16BIT ||
12381
+ sendSz > (int)WOLFSSL_MAX_16BIT) {
12382
return BAD_LENGTH_E;
12383
}
12384
0 commit comments