Commit c1facbb6 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Check EVP_DigestInit_ex() return value in EVP_BytesToKey().

parent f2c33fa6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);