projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix error code
[oweals/openssl.git]
/
crypto
/
sha
/
sha_one.c
diff --git
a/crypto/sha/sha_one.c
b/crypto/sha/sha_one.c
index 371ffddac6c88d6a1033e4a3a889380f887c69bb..3bae623ce882ce46360b0041ac4ef2db3d4b2728 100644
(file)
--- 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));