From ea03decf60b2d6f0f2235304572168a400d681ac Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Wed, 23 Apr 2025 13:54:36 -0600 Subject: [PATCH 1/3] fix for --group argument test, CID 516265 --- tests/unit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit.c b/tests/unit.c index 6bc6bda13..540dd800f 100644 --- a/tests/unit.c +++ b/tests/unit.c @@ -209,7 +209,7 @@ int unit_test(int argc, char** argv) goto exit; } else if (XSTRCMP(argv[1], "--group") == 0) { - if (argc == 1) { + if (argc == 2) { fprintf(stderr, "No group name supplied\n"); ret = -1; goto exit; From f96e493790fb9898f60e8bd6b2a5c7e86eacea84 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Wed, 23 Apr 2025 14:00:22 -0600 Subject: [PATCH 2/3] help static analyzer out, CID 516263 --- tests/quic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/quic.c b/tests/quic.c index 3b1f2f7fb..c2a12888e 100644 --- a/tests/quic.c +++ b/tests/quic.c @@ -346,6 +346,7 @@ static int test_provide_quic_data(void) { len = fake_record(1, 100, lbuffer); ExpectTrue(provide_data(ssl, wolfssl_encryption_initial, lbuffer, len, 1)); wolfSSL_free(ssl); + ssl = NULL; ExpectNotNull(ssl = wolfSSL_new(ctx)); len = fake_record(1, 100, lbuffer); From 6f1fe2e4b916e22e7342c3bc7d88f3fc298a4473 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Wed, 23 Apr 2025 17:11:05 -0600 Subject: [PATCH 3/3] add sanity check on des cbc decrypt, CID 512990 --- wolfcrypt/src/des3.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wolfcrypt/src/des3.c b/wolfcrypt/src/des3.c index 7a9ba3bc7..c4593c226 100644 --- a/wolfcrypt/src/des3.c +++ b/wolfcrypt/src/des3.c @@ -1742,6 +1742,10 @@ { word32 blocks = sz / DES_BLOCK_SIZE; + if (des == NULL || out == NULL || in == NULL) { + return BAD_FUNC_ARG; + } + while (blocks--) { XMEMCPY(des->tmp, in, DES_BLOCK_SIZE); DesProcessBlock(des, (byte*)des->tmp, out);