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


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

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

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

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

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

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

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

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

crypto/x509/x509_req.c:130:5: 
128.   
129.       xk = X509_REQ_get_pubkey(x);
130. >     switch (EVP_PKEY_cmp(xk, k)) {
131.       case 1:
132.           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.   
