Commit bc46db60 authored by Emilia Kasper's avatar Emilia Kasper
Browse files

RT3061: slightly amend patch



Add an extra NULL dereference check

Reviewed-by: default avatarViktor Dukhovni <viktor@openssl.org>
parent d64c533a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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
		}
	};