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


crypto/x509/x509_cmp.c:257:1: start of procedure X509_check_private_key()
255.   	}
256.   
257. > int X509_check_private_key(X509 *x, EVP_PKEY *k)
258.   	{
259.   	EVP_PKEY *xk=NULL;

crypto/x509/x509_cmp.c:259:2: 
257.   int X509_check_private_key(X509 *x, EVP_PKEY *k)
258.   	{
259. > 	EVP_PKEY *xk=NULL;
260.   	int ok=0;
261.   

crypto/x509/x509_cmp.c:260:2: 
258.   	{
259.   	EVP_PKEY *xk=NULL;
260. > 	int ok=0;
261.   
262.   	xk=X509_get_pubkey(x);

crypto/x509/x509_cmp.c:262:2: 
260.   	int ok=0;
261.   
262. > 	xk=X509_get_pubkey(x);
263.   	if (xk->type != k->type)
264.   	    {

crypto/x509/x509_cmp.c:250:1: start of procedure X509_get_pubkey()
  248.   	}
  249.   
  250. > EVP_PKEY *X509_get_pubkey(X509 *x)
  251.   	{
  252.   	if ((x == NULL) || (x->cert_info == NULL))

crypto/x509/x509_cmp.c:252:7: Taking false branch
  250.   EVP_PKEY *X509_get_pubkey(X509 *x)
  251.   	{
  252.   	if ((x == NULL) || (x->cert_info == NULL))
               ^
  253.   		return(NULL);
  254.   	return(X509_PUBKEY_get(x->cert_info->key));

crypto/x509/x509_cmp.c:252:22: Taking true branch
  250.   EVP_PKEY *X509_get_pubkey(X509 *x)
  251.   	{
  252.   	if ((x == NULL) || (x->cert_info == NULL))
                              ^
  253.   		return(NULL);
  254.   	return(X509_PUBKEY_get(x->cert_info->key));

crypto/x509/x509_cmp.c:253:3: 
  251.   	{
  252.   	if ((x == NULL) || (x->cert_info == NULL))
  253. > 		return(NULL);
  254.   	return(X509_PUBKEY_get(x->cert_info->key));
  255.   	}

crypto/x509/x509_cmp.c:255:2: return from a call to X509_get_pubkey
  253.   		return(NULL);
  254.   	return(X509_PUBKEY_get(x->cert_info->key));
  255.   	}
          ^
  256.   
  257.   int X509_check_private_key(X509 *x, EVP_PKEY *k)

crypto/x509/x509_cmp.c:263:6: 
261.   
262.   	xk=X509_get_pubkey(x);
263. > 	if (xk->type != k->type)
264.   	    {
265.   	    X509err(X509_F_X509_CHECK_PRIVATE_KEY,X509_R_KEY_TYPE_MISMATCH);
