summaryrefslogtreecommitdiffstats
path: root/crypto/mdc2
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/mdc2
parent2b85e23d2e0c4f5c8ee1cc7d38fc42ce18e13f1c (diff)
Check return values of <Digest>_Init functions in low level digest calls.
Diffstat (limited to 'crypto/mdc2')
-rw-r--r--crypto/mdc2/mdc2_one.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/mdc2/mdc2_one.c b/crypto/mdc2/mdc2_one.c
index cd569aa865..72647f67ed 100644
--- a/crypto/mdc2/mdc2_one.c
+++ b/crypto/mdc2/mdc2_one.c
@@ -66,7 +66,8 @@ unsigned char *MDC2(const unsigned char *d, size_t 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 */