aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2007-05-31 12:39:21 +0000
committerDr. Stephen Henson <steve@openssl.org>2007-05-31 12:39:21 +0000
commit18096abb2939fb7d2cf24842310649908dc283ac (patch)
treece2fff76bda5f9e5eaf58a279eb1ad58283ff5dc /crypto/evp/evp_lib.c
parent0aa08a2e34bd905d14e2f684df724d4fd925b43b (diff)
downloadopenssl-18096abb2939fb7d2cf24842310649908dc283ac.tar.gz
Handle NULL parameter in some EVP utility functions.
Diffstat (limited to 'crypto/evp/evp_lib.c')
-rw-r--r--crypto/evp/evp_lib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c
index e4d5b682f3..daccb66820 100644
--- a/crypto/evp/evp_lib.c
+++ b/crypto/evp/evp_lib.c
@@ -255,11 +255,15 @@ int EVP_MD_pkey_type(const EVP_MD *md)
int EVP_MD_size(const EVP_MD *md)
{
+ if (!md)
+ return -1;
return md->md_size;
}
const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx)
{
+ if (!ctx)
+ return NULL;
return ctx->digest;
}