提交 0716f9e4 编写于 作者: J Jonas Maebe 提交者: Kurt Roeckx

pkey_gost_mac_keygen: check for NULL after allocating keydata

Signed-off-by: NKurt Roeckx <kurt@roeckx.be>
Reviewed-by: NRichard Levitte <levitte@openssl.org>
上级 787e9929
......@@ -562,6 +562,8 @@ static int pkey_gost_mac_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
return 0;
}
keydata = OPENSSL_malloc(32);
if (keydata == NULL)
return 0;
memcpy(keydata,data->key,32);
EVP_PKEY_assign(pkey, NID_id_Gost28147_89_MAC, keydata);
return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册