From: Andy Polyakov Date: Tue, 25 Feb 2014 21:21:54 +0000 (+0100) Subject: ssl/t1_enc.c: check EVP_MD_CTX_copy return value. X-Git-Tag: OpenSSL_1_0_0m~76 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ffa0e161985a77351d46f70526d6f43330e1a447;p=oweals%2Fopenssl.git ssl/t1_enc.c: check EVP_MD_CTX_copy return value. PR: 3201 (cherry picked from commit 03da57fe14f2de5bde9d4496a2ae9a4ae8879f88) --- diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 6c76b5c19c..e8224e63ec 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -887,7 +887,8 @@ int tls1_mac(SSL *ssl, unsigned char *md, int send) } else { - EVP_MD_CTX_copy(&hmac,hash); + if (!EVP_MD_CTX_copy(&hmac,hash)) + return -1; mac_ctx = &hmac; }