Skip to content

fix for sanity check on --group with unit test app and null sanity check with des decrypt #8711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/quic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions wolfcrypt/src/des3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down