From: Dr. Stephen Henson Date: Thu, 31 May 2007 12:39:21 +0000 (+0000) Subject: Handle NULL parameter in some EVP utility functions. X-Git-Tag: OpenSSL_0_9_8k^2~807 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=18096abb2939fb7d2cf24842310649908dc283ac;p=oweals%2Fopenssl.git Handle NULL parameter in some EVP utility functions. --- 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; }