apps/x509.c:1215: error: NULL_DEREFERENCE
  pointer `upkey` last assigned on line 1214 could be null and is dereferenced by call to `EVP_PKEY_copy_parameters()` at line 1215, column 2.
Showing all 10 steps of the trace


apps/x509.c:1202:1: start of procedure x509_certify()
1200.   	}
1201.   
1202. > static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
1203.   	     		X509 *x, X509 *xca, EVP_PKEY *pkey,
1204.   			STACK_OF(OPENSSL_STRING) *sigopts,

apps/x509.c:1209:2: 
1207.   			ASN1_INTEGER *sno)
1208.   	{
1209. > 	int ret=0;
1210.   	ASN1_INTEGER *bs=NULL;
1211.   	X509_STORE_CTX xsc;

apps/x509.c:1210:2: 
1208.   	{
1209.   	int ret=0;
1210. > 	ASN1_INTEGER *bs=NULL;
1211.   	X509_STORE_CTX xsc;
1212.   	EVP_PKEY *upkey;

apps/x509.c:1214:2: 
1212.   	EVP_PKEY *upkey;
1213.   
1214. > 	upkey = X509_get_pubkey(xca);
1215.   	EVP_PKEY_copy_parameters(upkey,pkey);
1216.   	EVP_PKEY_free(upkey);

crypto/x509/x509_cmp.c:300:1: start of procedure X509_get_pubkey()
  298.   	}
  299.   
  300. > EVP_PKEY *X509_get_pubkey(X509 *x)
  301.   	{
  302.   	if ((x == NULL) || (x->cert_info == NULL))

crypto/x509/x509_cmp.c:302:7: Taking false branch
  300.   EVP_PKEY *X509_get_pubkey(X509 *x)
  301.   	{
  302.   	if ((x == NULL) || (x->cert_info == NULL))
               ^
  303.   		return(NULL);
  304.   	return(X509_PUBKEY_get(x->cert_info->key));

crypto/x509/x509_cmp.c:302:22: Taking true branch
  300.   EVP_PKEY *X509_get_pubkey(X509 *x)
  301.   	{
  302.   	if ((x == NULL) || (x->cert_info == NULL))
                              ^
  303.   		return(NULL);
  304.   	return(X509_PUBKEY_get(x->cert_info->key));

crypto/x509/x509_cmp.c:303:3: 
  301.   	{
  302.   	if ((x == NULL) || (x->cert_info == NULL))
  303. > 		return(NULL);
  304.   	return(X509_PUBKEY_get(x->cert_info->key));
  305.   	}

crypto/x509/x509_cmp.c:305:2: return from a call to X509_get_pubkey
  303.   		return(NULL);
  304.   	return(X509_PUBKEY_get(x->cert_info->key));
  305.   	}
          ^
  306.   
  307.   ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x)

apps/x509.c:1215:2: 
1213.   
1214.   	upkey = X509_get_pubkey(xca);
1215. > 	EVP_PKEY_copy_parameters(upkey,pkey);
1216.   	EVP_PKEY_free(upkey);
1217.   
