crypto/x509/x509_req.c:129: error: NULL_DEREFERENCE
  pointer `xk` last assigned on line 128 could be null and is dereferenced by call to `EVP_PKEY_cmp()` at line 129, column 13.
Showing all 16 steps of the trace


crypto/x509/x509_req.c:123:1: start of procedure X509_REQ_check_private_key()
121.   }
122.   
123. > int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
124.   {
125.       EVP_PKEY *xk = NULL;

crypto/x509/x509_req.c:125:5: 
123.   int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
124.   {
125. >     EVP_PKEY *xk = NULL;
126.       int ok = 0;
127.   

crypto/x509/x509_req.c:126:5: 
124.   {
125.       EVP_PKEY *xk = NULL;
126. >     int ok = 0;
127.   
128.       xk = X509_REQ_get_pubkey(x);

crypto/x509/x509_req.c:128:5: 
126.       int ok = 0;
127.   
128. >     xk = X509_REQ_get_pubkey(x);
129.       switch (EVP_PKEY_cmp(xk, k)) {
130.       case 1:

crypto/x509/x509_req.c:111:1: start of procedure X509_REQ_get_pubkey()
  109.   }
  110.   
  111. > EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)
  112.   {
  113.       if (req == NULL)

crypto/x509/x509_req.c:113:9: Taking false branch
  111.   EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)
  112.   {
  113.       if (req == NULL)
                 ^
  114.           return (NULL);
  115.       return (X509_PUBKEY_get(req->req_info.pubkey));

crypto/x509/x509_req.c:115:5: 
  113.       if (req == NULL)
  114.           return (NULL);
  115. >     return (X509_PUBKEY_get(req->req_info.pubkey));
  116.   }
  117.   

crypto/asn1/x_pubkey.c:182:1: start of procedure X509_PUBKEY_get()
    180.   }
    181.   
    182. > EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
    183.   {
    184.       EVP_PKEY *ret = X509_PUBKEY_get0(key);

crypto/asn1/x_pubkey.c:184:5: Skipping X509_PUBKEY_get0(): empty list of specs
    182.   EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
    183.   {
    184.       EVP_PKEY *ret = X509_PUBKEY_get0(key);
               ^
    185.       if (ret != NULL)
    186.           EVP_PKEY_up_ref(ret);

crypto/asn1/x_pubkey.c:185:9: Taking false branch
    183.   {
    184.       EVP_PKEY *ret = X509_PUBKEY_get0(key);
    185.       if (ret != NULL)
                   ^
    186.           EVP_PKEY_up_ref(ret);
    187.       return ret;

crypto/asn1/x_pubkey.c:187:5: 
    185.       if (ret != NULL)
    186.           EVP_PKEY_up_ref(ret);
    187. >     return ret;
    188.   }
    189.   

crypto/asn1/x_pubkey.c:188:1: return from a call to X509_PUBKEY_get
    186.           EVP_PKEY_up_ref(ret);
    187.       return ret;
    188. > }
    189.   
    190.   /*

crypto/x509/x509_req.c:116:1: return from a call to X509_REQ_get_pubkey
  114.           return (NULL);
  115.       return (X509_PUBKEY_get(req->req_info.pubkey));
  116. > }
  117.   
  118.   X509_PUBKEY *X509_REQ_get_X509_PUBKEY(X509_REQ *req)

crypto/x509/x509_req.c:129:5: 
127.   
128.       xk = X509_REQ_get_pubkey(x);
129. >     switch (EVP_PKEY_cmp(xk, k)) {
130.       case 1:
131.           ok = 1;

crypto/evp/p_lib.c:166:1: start of procedure EVP_PKEY_cmp()
  164.   }
  165.   
  166. > int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
  167.   {
  168.       if (a->type != b->type)

crypto/evp/p_lib.c:168:9: 
  166.   int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
  167.   {
  168. >     if (a->type != b->type)
  169.           return -1;
  170.   
