Check EVP_DigestInit_ex() return value in EVP_BytesToKey().
This commit is contained in:
parent
f2c33fa6fd
commit
c1facbb681
@ -126,7 +126,8 @@ int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
|
|||||||
EVP_MD_CTX_init(&c);
|
EVP_MD_CTX_init(&c);
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
EVP_DigestInit_ex(&c,md, NULL);
|
if (!EVP_DigestInit_ex(&c,md, NULL))
|
||||||
|
return 0;
|
||||||
if (addmd++)
|
if (addmd++)
|
||||||
EVP_DigestUpdate(&c,&(md_buf[0]),mds);
|
EVP_DigestUpdate(&c,&(md_buf[0]),mds);
|
||||||
EVP_DigestUpdate(&c,data,datal);
|
EVP_DigestUpdate(&c,data,datal);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user