Skip to content

Commit ffb43d0

Browse files
authored
Merge pull request #7348 from JacobBarthelmeh/coverity3
Coverity fixes
2 parents 69bc5c1 + d6b4b27 commit ffb43d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tls13.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10382,7 +10382,8 @@ int DoTls13Finished(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
1038210382

1038310383
if (sniff == NO_SNIFF) {
1038410384
/* Actually check verify data. */
10385-
if (XMEMCMP(input + *inOutIdx, mac, size) != 0){
10385+
if (size > WC_MAX_DIGEST_SIZE ||
10386+
XMEMCMP(input + *inOutIdx, mac, size) != 0){
1038610387
WOLFSSL_MSG("Verify finished error on hashes");
1038710388
SendAlert(ssl, alert_fatal, decrypt_error);
1038810389
WOLFSSL_ERROR_VERBOSE(VERIFY_FINISHED_ERROR);

0 commit comments

Comments
 (0)