Merge pull request #8711 from JacobBarthelmeh/coverity

fix for sanity check on --group with unit test app and null sanity check with des decrypt
pull/8762/head
David Garske 2025-05-09 11:41:53 -07:00 committed by GitHub
commit 68b83bfa14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 1 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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);