From: Ben Laurie Date: Mon, 29 Dec 2008 11:46:44 +0000 (+0000) Subject: Die earlier if we have no hash function. X-Git-Tag: OpenSSL_0_9_8k^2~86 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0e941da6fa83291c69516768c2b0af3944fe76b7;p=oweals%2Fopenssl.git Die earlier if we have no hash function. --- diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c index 8e484d3b0c..701ac57179 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -709,6 +709,8 @@ int ssl3_mac(SSL *ssl, unsigned char *md, int send) hash=ssl->read_hash; } + /* If hash is NULL, then a crash will follow anyway */ + OPENSSL_assert(hash); md_size=EVP_MD_CTX_size(hash); npad=(48/md_size)*md_size;