diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2005-04-14 22:58:44 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2005-04-14 22:58:44 +0000 |
commit | fbe6ba81e97e6df79f0ff3417b370a21668f774d (patch) | |
tree | dcf42dd313acf7144db057c14a117342808af051 /crypto/mdc2/mdc2_one.c | |
parent | 2b85e23d2e0c4f5c8ee1cc7d38fc42ce18e13f1c (diff) |
Check return values of <Digest>_Init functions in low level digest calls.
Diffstat (limited to 'crypto/mdc2/mdc2_one.c')
-rw-r--r-- | crypto/mdc2/mdc2_one.c | 3 |
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 */ |