From 0e941da6fa83291c69516768c2b0af3944fe76b7 Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Mon, 29 Dec 2008 11:46:44 +0000 Subject: [PATCH] Die earlier if we have no hash function. --- ssl/s3_enc.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.25.1