From 18096abb2939fb7d2cf24842310649908dc283ac Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 31 May 2007 12:39:21 +0000 Subject: Handle NULL parameter in some EVP utility functions. --- crypto/evp/evp_lib.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crypto/evp/evp_lib.c') 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; } -- cgit v1.2.3