test/evp_test.c: If no algorithm was specified, don't try to check for DES
authorRichard Levitte <levitte@openssl.org>
Sat, 28 Jan 2017 23:08:01 +0000 (00:08 +0100)
committerRichard Levitte <levitte@openssl.org>
Sun, 29 Jan 2017 00:19:14 +0000 (01:19 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2319)

test/evp_test.c

index e1a5f14328bb53127a8f98a5f90957de30043a75..b924f833a01f520db0e1df46e3644d7a9a8bc5f6 100644 (file)
@@ -1252,7 +1252,7 @@ static int mac_test_run(struct evp_test *t)
     size_t mac_len;
 
 #ifdef OPENSSL_NO_DES
-    if (strstr(mdata->alg, "DES") != NULL) {
+    if (mdata->alg != NULL && strstr(mdata->alg, "DES") != NULL) {
         /* Skip DES */
         err = NULL;
         goto err;