--- a/components/openssl/openssl-1.0.0/engines/t4/eng_t4_digest.c Fri Nov 04 05:41:01 2011 -0700
+++ b/components/openssl/openssl-1.0.0/engines/t4/eng_t4_digest.c Mon Nov 14 08:53:40 2011 -0800
@@ -370,6 +370,9 @@
static int
t4_digest_copy_md5(EVP_MD_CTX *to, const EVP_MD_CTX *from)
{
+ if ((to->md_data == NULL) || (from->md_data == NULL)) {
+ return (1);
+ }
(void) memcpy(to->md_data, from->md_data, sizeof (MD5_CTX));
return (1);
}
@@ -506,6 +509,9 @@
static int
t4_digest_copy_sha1(EVP_MD_CTX *to, const EVP_MD_CTX *from)
{
+ if ((to->md_data == NULL) || (from->md_data == NULL)) {
+ return (1);
+ }
(void) memcpy(to->md_data, from->md_data, sizeof (SHA1_CTX));
return (1);
}
@@ -517,6 +523,9 @@
static int
t4_digest_copy_sha2(EVP_MD_CTX *to, const EVP_MD_CTX *from)
{
+ if ((to->md_data == NULL) || (from->md_data == NULL)) {
+ return (1);
+ }
(void) memcpy(to->md_data, from->md_data, sizeof (SHA2_CTX));
return (1);
}