summaryrefslogtreecommitdiffstats
path: root/crypto/md2/md2_one.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2005-04-15 00:58:44 +0200
committerDr. Stephen Henson <steve@openssl.org>2005-04-15 00:58:44 +0200
commitfbe6ba81e97e6df79f0ff3417b370a21668f774d (patch)
treedcf42dd313acf7144db057c14a117342808af051 /crypto/md2/md2_one.c
parentPrototype mnemonics in padlock_verify_context for better portability (diff)
downloadopenssl-fbe6ba81e97e6df79f0ff3417b370a21668f774d.tar.xz
openssl-fbe6ba81e97e6df79f0ff3417b370a21668f774d.zip
Check return values of <Digest>_Init functions in low level digest calls.
Diffstat (limited to 'crypto/md2/md2_one.c')
-rw-r--r--crypto/md2/md2_one.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/md2/md2_one.c b/crypto/md2/md2_one.c
index dab35071ac..f7fef5cc0a 100644
--- a/crypto/md2/md2_one.c
+++ b/crypto/md2/md2_one.c
@@ -69,7 +69,8 @@ unsigned char *MD2(const unsigned char *d, size_t 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