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/sha/sha1_one.c | |
parent | 2b85e23d2e0c4f5c8ee1cc7d38fc42ce18e13f1c (diff) | |
download | openssl-fbe6ba81e97e6df79f0ff3417b370a21668f774d.tar.gz |
Check return values of <Digest>_Init functions in low level digest calls.
Diffstat (limited to 'crypto/sha/sha1_one.c')
-rw-r--r-- | crypto/sha/sha1_one.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/sha/sha1_one.c b/crypto/sha/sha1_one.c index 582b25394c..7c65b60276 100644 --- a/crypto/sha/sha1_one.c +++ b/crypto/sha/sha1_one.c @@ -68,7 +68,8 @@ unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md) static unsigned char m[SHA_DIGEST_LENGTH]; if (md == NULL) md=m; - SHA1_Init(&c); + if (!SHA1_Init(&c)) + return NULL; SHA1_Update(&c,d,n); SHA1_Final(md,&c); OPENSSL_cleanse(&c,sizeof(c)); |