diff options
Diffstat (limited to 'src/lib/libcrypto/sha/sha_one.c')
| -rw-r--r-- | src/lib/libcrypto/sha/sha_one.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/sha/sha_one.c b/src/lib/libcrypto/sha/sha_one.c index e61c63f3e9..d4f4d344df 100644 --- a/src/lib/libcrypto/sha/sha_one.c +++ b/src/lib/libcrypto/sha/sha_one.c | |||
| @@ -68,7 +68,8 @@ unsigned char *SHA(const unsigned char *d, unsigned long n, unsigned char *md) | |||
| 68 | static unsigned char m[SHA_DIGEST_LENGTH]; | 68 | static unsigned char m[SHA_DIGEST_LENGTH]; |
| 69 | 69 | ||
| 70 | if (md == NULL) md=m; | 70 | if (md == NULL) md=m; |
| 71 | SHA_Init(&c); | 71 | if (!SHA_Init(&c)) |
| 72 | return NULL; | ||
| 72 | SHA_Update(&c,d,n); | 73 | SHA_Update(&c,d,n); |
| 73 | SHA_Final(md,&c); | 74 | SHA_Final(md,&c); |
| 74 | OPENSSL_cleanse(&c,sizeof(c)); | 75 | OPENSSL_cleanse(&c,sizeof(c)); |
