Check EVP_DigestInit_ex() return value in EVP_BytesToKey().

This commit is contained in:
Dr. Stephen Henson 2006-03-01 21:17:13 +00:00
parent f2c33fa6fd
commit c1facbb681

View File

@ -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);