summaryrefslogtreecommitdiff
path: root/crypto/sha/sha_one.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/sha/sha_one.c')
-rw-r--r--crypto/sha/sha_one.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/sha/sha_one.c b/crypto/sha/sha_one.c
index 371ffddac..3bae623ce 100644
--- a/crypto/sha/sha_one.c
+++ b/crypto/sha/sha_one.c
@@ -68,7 +68,8 @@ unsigned char *SHA(const unsigned char *d, size_t 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));