ssl/t1_enc.c: check EVP_MD_CTX_copy return value.
authorAndy Polyakov <appro@openssl.org>
Tue, 25 Feb 2014 21:21:54 +0000 (22:21 +0100)
committerAndy Polyakov <appro@openssl.org>
Tue, 25 Feb 2014 21:21:54 +0000 (22:21 +0100)
PR: 3201

ssl/t1_enc.c

index 28471c2c829ac66e770481832efaab3c6e917ab3..a98f6fe882d7362d76e2fe273a7e4ccefd16b748 100644 (file)
@@ -1009,7 +1009,8 @@ int tls1_mac(SSL *ssl, unsigned char *md, int send)
                }
                else
                {
                }
                else
                {
-                       EVP_MD_CTX_copy(&hmac,hash);
+                       if (!EVP_MD_CTX_copy(&hmac,hash))
+                               return -1;
                        mac_ctx = &hmac;
                }
 
                        mac_ctx = &hmac;
                }