summaryrefslogtreecommitdiffstats
path: root/crypto/md5
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2005-04-14 22:58:44 +0000
committerDr. Stephen Henson <steve@openssl.org>2005-04-14 22:58:44 +0000
commitfbe6ba81e97e6df79f0ff3417b370a21668f774d (patch)
treedcf42dd313acf7144db057c14a117342808af051 /crypto/md5
parent2b85e23d2e0c4f5c8ee1cc7d38fc42ce18e13f1c (diff)
Check return values of <Digest>_Init functions in low level digest calls.
Diffstat (limited to 'crypto/md5')
-rw-r--r--crypto/md5/md5_one.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/md5/md5_one.c b/crypto/md5/md5_one.c
index 9918243ea2..43fee89379 100644
--- a/crypto/md5/md5_one.c
+++ b/crypto/md5/md5_one.c
@@ -71,7 +71,8 @@ unsigned char *MD5(const unsigned char *d, size_t 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