diff --git a/tests/quic.c b/tests/quic.c index 3b1f2f7fb3..c2a12888e5 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); diff --git a/tests/unit.c b/tests/unit.c index 6bc6bda131..540dd800fe 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; diff --git a/wolfcrypt/src/des3.c b/wolfcrypt/src/des3.c index 7a9ba3bc7f..c4593c2265 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);