Skip to content

Commit f62d0fa

Browse files
committed
check sigAlgs.size against WOLFSSL_MAX_SIGALGO
1 parent f44178c commit f62d0fa

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/dtls.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,8 @@ static int SendStatelessReplyDtls13(const WOLFSSL* ssl, WolfSSL_CH* ch)
678678
ERROR_OUT(BUFFER_ERROR, dtls13_cleanup);
679679
if ((sigAlgs.size % 2) != 0)
680680
ERROR_OUT(BUFFER_ERROR, dtls13_cleanup);
681+
if (sigAlgs.size > WOLFSSL_MAX_SIGALGO)
682+
ERROR_OUT(BUFFER_ERROR, dtls13_cleanup);
681683
suites.hashSigAlgoSz = (word16)sigAlgs.size;
682684
XMEMCPY(suites.hashSigAlgo, sigAlgs.elements, sigAlgs.size);
683685
haveSA = 1;

0 commit comments

Comments
 (0)