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


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

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

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

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

crypto/x509/x509_cmp.c:313:1: start of procedure X509_get_pubkey()
  311.   	}
  312.   
  313. > EVP_PKEY *X509_get_pubkey(X509 *x)
  314.   	{
  315.   	if ((x == NULL) || (x->cert_info == NULL))

crypto/x509/x509_cmp.c:315:7: Taking false branch
  313.   EVP_PKEY *X509_get_pubkey(X509 *x)
  314.   	{
  315.   	if ((x == NULL) || (x->cert_info == NULL))
               ^
  316.   		return(NULL);
  317.   	return(X509_PUBKEY_get(x->cert_info->key));

crypto/x509/x509_cmp.c:315:22: Taking true branch
  313.   EVP_PKEY *X509_get_pubkey(X509 *x)
  314.   	{
  315.   	if ((x == NULL) || (x->cert_info == NULL))
                              ^
  316.   		return(NULL);
  317.   	return(X509_PUBKEY_get(x->cert_info->key));

crypto/x509/x509_cmp.c:316:3: 
  314.   	{
  315.   	if ((x == NULL) || (x->cert_info == NULL))
  316. > 		return(NULL);
  317.   	return(X509_PUBKEY_get(x->cert_info->key));
  318.   	}

crypto/x509/x509_cmp.c:318:2: return from a call to X509_get_pubkey
  316.   		return(NULL);
  317.   	return(X509_PUBKEY_get(x->cert_info->key));
  318.   	}
          ^
  319.   
  320.   ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x)

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