diff options
author | Pauli <paul.dale@oracle.com> | 2019-09-08 18:37:13 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-09-11 08:27:26 +1000 |
commit | 64da55a64f141bb068f034ab0df34ec2a044e482 (patch) | |
tree | e680928e7efa3bcee1fd9c65f91e55ad75f8f541 /test | |
parent | 085f1d11a01e62c5abfe6486ee9dce00a808d977 (diff) |
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/9805)
Diffstat (limited to 'test')
-rw-r--r-- | test/evp_test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/evp_test.c b/test/evp_test.c index 1ff90c2283..67a818d98d 100644 --- a/test/evp_test.c +++ b/test/evp_test.c @@ -2047,14 +2047,15 @@ static int kdf_test_ctrl(EVP_TEST *t, EVP_KDF_CTX *kctx, if (p != NULL) *p++ = '\0'; - rv = OSSL_PARAM_allocate_from_text(kdata->p, defs, name, p, strlen(p)); + rv = OSSL_PARAM_allocate_from_text(kdata->p, defs, name, p, + p != NULL ? strlen(p) : 0); *++kdata->p = OSSL_PARAM_construct_end(); if (!rv) { t->err = "KDF_PARAM_ERROR"; OPENSSL_free(name); return 0; } - if (strcmp(name, "digest") == 0 && p != NULL) { + if (p != NULL && strcmp(name, "digest") == 0) { /* If p has an OID and lookup fails assume disabled algorithm */ int nid = OBJ_sn2nid(p); |