mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
pkey_gost_mac_keygen: check for NULL after allocating keydata
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
787e992965
commit
0716f9e405
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user