diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2005-04-14 22:59:17 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2005-04-14 22:59:17 +0000 |
commit | 8fc6cb77c50247b17d13353b65baea974c282691 (patch) | |
tree | a1c1b348f14b17c34af6dfeb61745b42d58bf86f | |
parent | b219bb8f62ad1a5c51ca15ab264875b009302623 (diff) | |
download | openssl-8fc6cb77c50247b17d13353b65baea974c282691.tar.gz |
Fix from HEAD.
-rw-r--r-- | crypto/md2/md2_one.c | 3 | ||||
-rw-r--r-- | crypto/md4/md4_one.c | 3 | ||||
-rw-r--r-- | crypto/md5/md5_one.c | 3 | ||||
-rw-r--r-- | crypto/mdc2/mdc2_one.c | 3 | ||||
-rw-r--r-- | crypto/ripemd/rmd_one.c | 3 | ||||
-rw-r--r-- | crypto/sha/sha1_one.c | 3 | ||||
-rw-r--r-- | crypto/sha/sha_one.c | 3 |
7 files changed, 14 insertions, 7 deletions
diff --git a/crypto/md2/md2_one.c b/crypto/md2/md2_one.c index 835160ef56..8c36ba5779 100644 --- a/crypto/md2/md2_one.c +++ b/crypto/md2/md2_one.c @@ -69,7 +69,8 @@ unsigned char *MD2(const unsigned char *d, unsigned long n, unsigned char *md) static unsigned char m[MD2_DIGEST_LENGTH]; if (md == NULL) md=m; - MD2_Init(&c); + if (!MD2_Init(&c)) + return NULL; #ifndef CHARSET_EBCDIC MD2_Update(&c,d,n); #else diff --git a/crypto/md4/md4_one.c b/crypto/md4/md4_one.c index 00565507e4..50f79352f6 100644 --- a/crypto/md4/md4_one.c +++ b/crypto/md4/md4_one.c @@ -71,7 +71,8 @@ unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md) static unsigned char m[MD4_DIGEST_LENGTH]; if (md == NULL) md=m; - MD4_Init(&c); + if (!MD4_Init(&c)) + return NULL; #ifndef CHARSET_EBCDIC MD4_Update(&c,d,n); #else diff --git a/crypto/md5/md5_one.c b/crypto/md5/md5_one.c index c5dd2d81db..44c6c455d1 100644 --- a/crypto/md5/md5_one.c +++ b/crypto/md5/md5_one.c @@ -71,7 +71,8 @@ unsigned char *MD5(const unsigned char *d, unsigned long n, unsigned char *md) static unsigned char m[MD5_DIGEST_LENGTH]; if (md == NULL) md=m; - MD5_Init(&c); + if (!MD5_Init(&c)) + return NULL; #ifndef CHARSET_EBCDIC MD5_Update(&c,d,n); #else diff --git a/crypto/mdc2/mdc2_one.c b/crypto/mdc2/mdc2_one.c index 37f06c8d77..067a82a9b7 100644 --- a/crypto/mdc2/mdc2_one.c +++ b/crypto/mdc2/mdc2_one.c @@ -66,7 +66,8 @@ unsigned char *MDC2(const unsigned char *d, unsigned long n, unsigned char *md) static unsigned char m[MDC2_DIGEST_LENGTH]; if (md == NULL) md=m; - MDC2_Init(&c); + if (!MDC2_Init(&c)) + return NULL; MDC2_Update(&c,d,n); MDC2_Final(md,&c); OPENSSL_cleanse(&c,sizeof(c)); /* security consideration */ diff --git a/crypto/ripemd/rmd_one.c b/crypto/ripemd/rmd_one.c index f8b580c33a..b88446b267 100644 --- a/crypto/ripemd/rmd_one.c +++ b/crypto/ripemd/rmd_one.c @@ -68,7 +68,8 @@ unsigned char *RIPEMD160(const unsigned char *d, unsigned long n, static unsigned char m[RIPEMD160_DIGEST_LENGTH]; if (md == NULL) md=m; - RIPEMD160_Init(&c); + if (!RIPEMD160_Init(&c)) + return NULL; RIPEMD160_Update(&c,d,n); RIPEMD160_Final(md,&c); OPENSSL_cleanse(&c,sizeof(c)); /* security consideration */ diff --git a/crypto/sha/sha1_one.c b/crypto/sha/sha1_one.c index 20e660c71d..e6d225216f 100644 --- a/crypto/sha/sha1_one.c +++ b/crypto/sha/sha1_one.c @@ -68,7 +68,8 @@ unsigned char *SHA1(const unsigned char *d, unsigned long n, unsigned char *md) static unsigned char m[SHA_DIGEST_LENGTH]; if (md == NULL) md=m; - SHA1_Init(&c); + if (!SHA1_Init(&c)) + return NULL; SHA1_Update(&c,d,n); SHA1_Final(md,&c); OPENSSL_cleanse(&c,sizeof(c)); diff --git a/crypto/sha/sha_one.c b/crypto/sha/sha_one.c index e61c63f3e9..d4f4d344df 100644 --- a/crypto/sha/sha_one.c +++ b/crypto/sha/sha_one.c @@ -68,7 +68,8 @@ unsigned char *SHA(const unsigned char *d, unsigned long n, unsigned char *md) static unsigned char m[SHA_DIGEST_LENGTH]; if (md == NULL) md=m; - SHA_Init(&c); + if (!SHA_Init(&c)) + return NULL; SHA_Update(&c,d,n); SHA_Final(md,&c); OPENSSL_cleanse(&c,sizeof(c)); |