crypto/x509/x509_cmp.c:279: error: NULL_DEREFERENCE
  pointer `xk` last assigned on line 278 could be null and is dereferenced at line 279, column 6.
Showing all 10 steps of the trace


crypto/x509/x509_cmp.c:273:1: start of procedure X509_check_private_key()
271.   	}
272.   
273. > int X509_check_private_key(X509 *x, EVP_PKEY *k)
274.   	{
275.   	EVP_PKEY *xk=NULL;

crypto/x509/x509_cmp.c:275:2: 
273.   int X509_check_private_key(X509 *x, EVP_PKEY *k)
274.   	{
275. > 	EVP_PKEY *xk=NULL;
276.   	int ok=0;
277.   

crypto/x509/x509_cmp.c:276:2: 
274.   	{
275.   	EVP_PKEY *xk=NULL;
276. > 	int ok=0;
277.   
278.   	xk=X509_get_pubkey(x);

crypto/x509/x509_cmp.c:278:2: 
276.   	int ok=0;
277.   
278. > 	xk=X509_get_pubkey(x);
279.   	if (xk->type != k->type)
280.   	    {

crypto/x509/x509_cmp.c:260:1: start of procedure X509_get_pubkey()
  258.   	}
  259.   
  260. > EVP_PKEY *X509_get_pubkey(X509 *x)
  261.   	{
  262.   	if ((x == NULL) || (x->cert_info == NULL))

crypto/x509/x509_cmp.c:262:7: Taking false branch
  260.   EVP_PKEY *X509_get_pubkey(X509 *x)
  261.   	{
  262.   	if ((x == NULL) || (x->cert_info == NULL))
               ^
  263.   		return(NULL);
  264.   	return(X509_PUBKEY_get(x->cert_info->key));

crypto/x509/x509_cmp.c:262:22: Taking true branch
  260.   EVP_PKEY *X509_get_pubkey(X509 *x)
  261.   	{
  262.   	if ((x == NULL) || (x->cert_info == NULL))
                              ^
  263.   		return(NULL);
  264.   	return(X509_PUBKEY_get(x->cert_info->key));

crypto/x509/x509_cmp.c:263:3: 
  261.   	{
  262.   	if ((x == NULL) || (x->cert_info == NULL))
  263. > 		return(NULL);
  264.   	return(X509_PUBKEY_get(x->cert_info->key));
  265.   	}

crypto/x509/x509_cmp.c:265:2: return from a call to X509_get_pubkey
  263.   		return(NULL);
  264.   	return(X509_PUBKEY_get(x->cert_info->key));
  265.   	}
          ^
  266.   
  267.   ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x)

crypto/x509/x509_cmp.c:279:6: 
277.   
278.   	xk=X509_get_pubkey(x);
279. > 	if (xk->type != k->type)
280.   	    {
281.   	    X509err(X509_F_X509_CHECK_PRIVATE_KEY,X509_R_KEY_TYPE_MISMATCH);
