evp: prevent underflow in base64 decoding
[openssl.git] / ssl / t1_enc.c
index 56db83430630b0dc2e67e302bc5d484046979de2..0c4cddedf85c703e55d7b5bbf5be6612dabaf221 100644 (file)
@@ -986,7 +986,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;
                }