diff options
Diffstat (limited to 'lib/libcrypto/sha/sha_one.c')
-rw-r--r-- | lib/libcrypto/sha/sha_one.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libcrypto/sha/sha_one.c b/lib/libcrypto/sha/sha_one.c index e61c63f3e99..d4f4d344df2 100644 --- a/lib/libcrypto/sha/sha_one.c +++ b/lib/libcrypto/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)); |