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


crypto/x509/x509_req.c:82:1: start of procedure X509_REQ_check_private_key()
80.   }
81.   
82. > int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
83.   {
84.       EVP_PKEY *xk = NULL;

crypto/x509/x509_req.c:84:5: 
82.   int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
83.   {
84. >     EVP_PKEY *xk = NULL;
85.       int ok = 0;
86.   

crypto/x509/x509_req.c:85:5: 
83.   {
84.       EVP_PKEY *xk = NULL;
85. >     int ok = 0;
86.   
87.       xk = X509_REQ_get_pubkey(x);

crypto/x509/x509_req.c:87:5: 
85.       int ok = 0;
86.   
87. >     xk = X509_REQ_get_pubkey(x);
88.       switch (EVP_PKEY_cmp(xk, k)) {
89.       case 1:

crypto/x509/x509_req.c:63:1: start of procedure X509_REQ_get_pubkey()
  61.   }
  62.   
  63. > EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)
  64.   {
  65.       if (req == NULL)

crypto/x509/x509_req.c:65:9: Taking false branch
  63.   EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)
  64.   {
  65.       if (req == NULL)
                ^
  66.           return NULL;
  67.       return X509_PUBKEY_get(req->req_info.pubkey);

crypto/x509/x509_req.c:67:5: 
  65.       if (req == NULL)
  66.           return NULL;
  67. >     return X509_PUBKEY_get(req->req_info.pubkey);
  68.   }
  69.   

crypto/x509/x_pubkey.c:169:1: start of procedure X509_PUBKEY_get()
    167.   }
    168.   
    169. > EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
    170.   {
    171.       EVP_PKEY *ret = X509_PUBKEY_get0(key);

crypto/x509/x_pubkey.c:171:5: 
    169.   EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
    170.   {
    171. >     EVP_PKEY *ret = X509_PUBKEY_get0(key);
    172.       if (ret != NULL)
    173.           EVP_PKEY_up_ref(ret);

crypto/x509/x_pubkey.c:141:1: start of procedure X509_PUBKEY_get0()
      139.   }
      140.   
      141. > EVP_PKEY *X509_PUBKEY_get0(X509_PUBKEY *key)
      142.   {
      143.       EVP_PKEY *ret = NULL;

crypto/x509/x_pubkey.c:143:5: 
      141.   EVP_PKEY *X509_PUBKEY_get0(X509_PUBKEY *key)
      142.   {
      143. >     EVP_PKEY *ret = NULL;
      144.   
      145.       if (key == NULL || key->public_key == NULL)

crypto/x509/x_pubkey.c:145:9: Taking false branch
      143.       EVP_PKEY *ret = NULL;
      144.   
      145.       if (key == NULL || key->public_key == NULL)
                     ^
      146.           return NULL;
      147.   

crypto/x509/x_pubkey.c:145:24: Taking false branch
      143.       EVP_PKEY *ret = NULL;
      144.   
      145.       if (key == NULL || key->public_key == NULL)
                                    ^
      146.           return NULL;
      147.   

crypto/x509/x_pubkey.c:148:9: Taking false branch
      146.           return NULL;
      147.   
      148.       if (key->pkey != NULL)
                     ^
      149.           return key->pkey;
      150.   

crypto/x509/x_pubkey.c:159:5: 
      157.        * in the queue.
      158.        */
      159. >     x509_pubkey_decode(&ret, key);
      160.       /* If decode doesn't fail something bad happened */
      161.       if (ret != NULL) {

crypto/x509/x_pubkey.c:104:1: start of procedure x509_pubkey_decode()
        102.   
        103.   
        104. > static int x509_pubkey_decode(EVP_PKEY **ppkey, X509_PUBKEY *key)
        105.   {
        106.       EVP_PKEY *pkey = EVP_PKEY_new();

crypto/x509/x_pubkey.c:106:5: Skipping EVP_PKEY_new(): empty list of specs
        104.   static int x509_pubkey_decode(EVP_PKEY **ppkey, X509_PUBKEY *key)
        105.   {
        106.       EVP_PKEY *pkey = EVP_PKEY_new();
                   ^
        107.   
        108.       if (pkey == NULL) {

crypto/x509/x_pubkey.c:108:9: Taking true branch
        106.       EVP_PKEY *pkey = EVP_PKEY_new();
        107.   
        108.       if (pkey == NULL) {
                       ^
        109.           X509err(X509_F_X509_PUBKEY_DECODE, ERR_R_MALLOC_FAILURE);
        110.           return -1;

crypto/x509/x_pubkey.c:109:9: 
        107.   
        108.       if (pkey == NULL) {
        109. >         X509err(X509_F_X509_PUBKEY_DECODE, ERR_R_MALLOC_FAILURE);
        110.           return -1;
        111.       }

providers/fips/fipsprov.c:381:1: start of procedure ERR_put_error()
          379.   }
          380.   
          381. > void ERR_put_error(int lib, int func, int reason, const char *file, int line)
          382.   {
          383.       /*

providers/fips/fipsprov.c:388:5: Skipping __function_pointer__(): unresolved function pointer
          386.        * a OPENSSL_CTX pointer.
          387.        */
          388.       c_put_error(NULL, ERR_PACK(lib, func, reason), file, line);
                     ^
          389.       ERR_add_error_data(1, "(in the FIPS module)");
          390.   }

providers/fips/fipsprov.c:389:5: Skipping ERR_add_error_data(): empty list of specs
          387.        */
          388.       c_put_error(NULL, ERR_PACK(lib, func, reason), file, line);
          389.       ERR_add_error_data(1, "(in the FIPS module)");
                     ^
          390.   }
          391.   

providers/fips/fipsprov.c:390:1: return from a call to ERR_put_error
          388.       c_put_error(NULL, ERR_PACK(lib, func, reason), file, line);
          389.       ERR_add_error_data(1, "(in the FIPS module)");
          390. > }
          391.   
          392.   void ERR_add_error_data(int num, ...)

crypto/x509/x_pubkey.c:110:9: 
        108.       if (pkey == NULL) {
        109.           X509err(X509_F_X509_PUBKEY_DECODE, ERR_R_MALLOC_FAILURE);
        110. >         return -1;
        111.       }
        112.   

crypto/x509/x_pubkey.c:139:1: return from a call to x509_pubkey_decode
        137.       EVP_PKEY_free(pkey);
        138.       return 0;
        139. > }
        140.   
        141.   EVP_PKEY *X509_PUBKEY_get0(X509_PUBKEY *key)

crypto/x509/x_pubkey.c:161:9: Taking false branch
      159.       x509_pubkey_decode(&ret, key);
      160.       /* If decode doesn't fail something bad happened */
      161.       if (ret != NULL) {
                     ^
      162.           X509err(X509_F_X509_PUBKEY_GET0, ERR_R_INTERNAL_ERROR);
      163.           EVP_PKEY_free(ret);

crypto/x509/x_pubkey.c:166:5: 
      164.       }
      165.   
      166. >     return NULL;
      167.   }
      168.   

crypto/x509/x_pubkey.c:167:1: return from a call to X509_PUBKEY_get0
      165.   
      166.       return NULL;
      167. > }
      168.   
      169.   EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)

crypto/x509/x_pubkey.c:172:9: Taking false branch
    170.   {
    171.       EVP_PKEY *ret = X509_PUBKEY_get0(key);
    172.       if (ret != NULL)
                   ^
    173.           EVP_PKEY_up_ref(ret);
    174.       return ret;

crypto/x509/x_pubkey.c:174:5: 
    172.       if (ret != NULL)
    173.           EVP_PKEY_up_ref(ret);
    174. >     return ret;
    175.   }
    176.   

crypto/x509/x_pubkey.c:175:1: return from a call to X509_PUBKEY_get
    173.           EVP_PKEY_up_ref(ret);
    174.       return ret;
    175. > }
    176.   
    177.   /*

crypto/x509/x509_req.c:68:1: return from a call to X509_REQ_get_pubkey
  66.           return NULL;
  67.       return X509_PUBKEY_get(req->req_info.pubkey);
  68. > }
  69.   
  70.   EVP_PKEY *X509_REQ_get0_pubkey(X509_REQ *req)

crypto/x509/x509_req.c:88:5: 
86.   
87.       xk = X509_REQ_get_pubkey(x);
88. >     switch (EVP_PKEY_cmp(xk, k)) {
89.       case 1:
90.           ok = 1;

crypto/evp/p_lib.c:119:1: start of procedure EVP_PKEY_cmp()
  117.   }
  118.   
  119. > int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
  120.   {
  121.       if (a->type != b->type)

crypto/evp/p_lib.c:121:9: 
  119.   int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
  120.   {
  121. >     if (a->type != b->type)
  122.           return -1;
  123.   
