summaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_key.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2006-03-01 22:17:13 +0100
committerDr. Stephen Henson <steve@openssl.org>2006-03-01 22:17:13 +0100
commitc1facbb68143424f4f80d746f3f8ed8b143896e1 (patch)
tree643af563b27a73ae47c1fb2a98257b12292ad439 /crypto/evp/evp_key.c
parentforce C locale when using [a-z] in sed expressions (diff)
downloadopenssl-c1facbb68143424f4f80d746f3f8ed8b143896e1.tar.xz
openssl-c1facbb68143424f4f80d746f3f8ed8b143896e1.zip
Check EVP_DigestInit_ex() return value in EVP_BytesToKey().
Diffstat (limited to 'crypto/evp/evp_key.c')
-rw-r--r--crypto/evp/evp_key.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/evp/evp_key.c b/crypto/evp/evp_key.c
index 0a27f496c9..361ea69ab6 100644
--- a/crypto/evp/evp_key.c
+++ b/crypto/evp/evp_key.c
@@ -126,7 +126,8 @@ int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
EVP_MD_CTX_init(&c);
for (;;)
{
- EVP_DigestInit_ex(&c,md, NULL);
+ if (!EVP_DigestInit_ex(&c,md, NULL))
+ return 0;
if (addmd++)
EVP_DigestUpdate(&c,&(md_buf[0]),mds);
EVP_DigestUpdate(&c,data,datal);