summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/mdc2test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/mdc2test.c b/test/mdc2test.c
index 619574fb04..c40e4b26ba 100644
--- a/test/mdc2test.c
+++ b/test/mdc2test.c
@@ -48,7 +48,7 @@ static int test_mdc2(void)
int testresult = 0;
unsigned int pad_type = 2;
unsigned char md[MDC2_DIGEST_LENGTH];
- EVP_MD_CTX *c;
+ EVP_MD_CTX *c = NULL;
static char text[] = "Now is the time for all ";
size_t tlen = strlen(text), i = 0;
OSSL_PROVIDER *prov = NULL;
@@ -59,6 +59,9 @@ static int test_mdc2(void)
params[i++] = OSSL_PARAM_construct_end();
prov = OSSL_PROVIDER_load(NULL, "legacy");
+ if (!TEST_ptr(prov))
+ goto end;
+
# ifdef CHARSET_EBCDIC
ebcdic2ascii(text, text, tlen);
# endif