mirror of
https://github.com/openssl/openssl.git
synced 2025-03-07 19:38:33 +08:00
RT3061: slightly amend patch
Add an extra NULL dereference check Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
This commit is contained in:
parent
d64c533a20
commit
bc46db60f1
@ -307,7 +307,7 @@ static int dsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey)
|
||||
unsigned char *dp = NULL;
|
||||
int dplen;
|
||||
|
||||
if (!pkey->pkey.dsa->priv_key)
|
||||
if (!pkey->pkey.dsa || !pkey->pkey.dsa->priv_key)
|
||||
{
|
||||
DSAerr(DSA_F_DSA_PRIV_ENCODE,DSA_R_MISSING_PARAMETERS);
|
||||
goto err;
|
||||
@ -717,4 +717,3 @@ const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[] =
|
||||
old_dsa_priv_encode
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user