crypto/ec/ecx_meth.c:525: error: NULL_DEREFERENCE
  pointer `null` is dereferenced by call to `EVP_DigestVerifyInit()` at line 525, column 10.
Showing all 37 steps of the trace


crypto/ec/ecx_meth.c:509:1: start of procedure ecd_item_verify()
507.   }
508.   
509. > static int ecd_item_verify(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,
510.                              X509_ALGOR *sigalg, ASN1_BIT_STRING *str,
511.                              EVP_PKEY *pkey)

crypto/ec/ecx_meth.c:518:5: 
516.   
517.       /* Sanity check: make sure it is ED25519/ED448 with absent parameters */
518. >     X509_ALGOR_get0(&obj, &ptype, NULL, sigalg);
519.       nid = OBJ_obj2nid(obj);
520.       if ((nid != NID_ED25519 && nid != NID_ED448) || ptype != V_ASN1_UNDEF) {

crypto/asn1/x_algor.c:54:1: start of procedure X509_ALGOR_get0()
  52.   }
  53.   
  54. > void X509_ALGOR_get0(const ASN1_OBJECT **paobj, int *pptype,
  55.                        const void **ppval, const X509_ALGOR *algor)
  56.   {

crypto/asn1/x_algor.c:57:9: Taking true branch
  55.                        const void **ppval, const X509_ALGOR *algor)
  56.   {
  57.       if (paobj)
                ^
  58.           *paobj = algor->algorithm;
  59.       if (pptype) {

crypto/asn1/x_algor.c:58:9: 
  56.   {
  57.       if (paobj)
  58. >         *paobj = algor->algorithm;
  59.       if (pptype) {
  60.           if (algor->parameter == NULL) {

crypto/asn1/x_algor.c:59:9: Taking true branch
  57.       if (paobj)
  58.           *paobj = algor->algorithm;
  59.       if (pptype) {
                ^
  60.           if (algor->parameter == NULL) {
  61.               *pptype = V_ASN1_UNDEF;

crypto/asn1/x_algor.c:60:13: Taking false branch
  58.           *paobj = algor->algorithm;
  59.       if (pptype) {
  60.           if (algor->parameter == NULL) {
                    ^
  61.               *pptype = V_ASN1_UNDEF;
  62.               return;

crypto/asn1/x_algor.c:64:13: 
  62.               return;
  63.           } else
  64. >             *pptype = algor->parameter->type;
  65.           if (ppval)
  66.               *ppval = algor->parameter->value.ptr;

crypto/asn1/x_algor.c:65:13: Taking false branch
  63.           } else
  64.               *pptype = algor->parameter->type;
  65.           if (ppval)
                    ^
  66.               *ppval = algor->parameter->value.ptr;
  67.       }

crypto/asn1/x_algor.c:59:5: 
  57.       if (paobj)
  58.           *paobj = algor->algorithm;
  59. >     if (pptype) {
  60.           if (algor->parameter == NULL) {
  61.               *pptype = V_ASN1_UNDEF;

crypto/asn1/x_algor.c:68:1: return from a call to X509_ALGOR_get0
  66.               *ppval = algor->parameter->value.ptr;
  67.       }
  68. > }
  69.   
  70.   /* Set up an X509_ALGOR DigestAlgorithmIdentifier from an EVP_MD */

crypto/ec/ecx_meth.c:519:5: 
517.       /* Sanity check: make sure it is ED25519/ED448 with absent parameters */
518.       X509_ALGOR_get0(&obj, &ptype, NULL, sigalg);
519. >     nid = OBJ_obj2nid(obj);
520.       if ((nid != NID_ED25519 && nid != NID_ED448) || ptype != V_ASN1_UNDEF) {
521.           ECerr(EC_F_ECD_ITEM_VERIFY, EC_R_INVALID_ENCODING);

crypto/objects/obj_dat.c:326:1: start of procedure OBJ_obj2nid()
  324.   IMPLEMENT_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, obj);
  325.   
  326. > int OBJ_obj2nid(const ASN1_OBJECT *a)
  327.   {
  328.       const unsigned int *op;

crypto/objects/obj_dat.c:331:9: Taking false branch
  329.       ADDED_OBJ ad, *adp;
  330.   
  331.       if (a == NULL)
                 ^
  332.           return NID_undef;
  333.       if (a->nid != 0)

crypto/objects/obj_dat.c:333:9: Taking false branch
  331.       if (a == NULL)
  332.           return NID_undef;
  333.       if (a->nid != 0)
                 ^
  334.           return a->nid;
  335.   

crypto/objects/obj_dat.c:336:9: Taking false branch
  334.           return a->nid;
  335.   
  336.       if (a->length == 0)
                 ^
  337.           return NID_undef;
  338.   

crypto/objects/obj_dat.c:340:5: Skipping OPENSSL_init_crypto(): empty list of specs
  338.   
  339.       /* Make sure we've loaded config before checking for any "added" objects */
  340.       OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
             ^
  341.   
  342.       if (added != NULL) {

crypto/objects/obj_dat.c:342:9: Taking true branch
  340.       OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
  341.   
  342.       if (added != NULL) {
                 ^
  343.           ad.type = ADDED_DATA;
  344.           ad.obj = (ASN1_OBJECT *)a; /* XXX: ugly but harmless */

crypto/objects/obj_dat.c:343:9: 
  341.   
  342.       if (added != NULL) {
  343. >         ad.type = ADDED_DATA;
  344.           ad.obj = (ASN1_OBJECT *)a; /* XXX: ugly but harmless */
  345.           adp = lh_ADDED_OBJ_retrieve(added, &ad);

crypto/objects/obj_dat.c:344:9: 
  342.       if (added != NULL) {
  343.           ad.type = ADDED_DATA;
  344. >         ad.obj = (ASN1_OBJECT *)a; /* XXX: ugly but harmless */
  345.           adp = lh_ADDED_OBJ_retrieve(added, &ad);
  346.           if (adp != NULL)

crypto/objects/obj_dat.c:345:9: 
  343.           ad.type = ADDED_DATA;
  344.           ad.obj = (ASN1_OBJECT *)a; /* XXX: ugly but harmless */
  345. >         adp = lh_ADDED_OBJ_retrieve(added, &ad);
  346.           if (adp != NULL)
  347.               return adp->obj->nid;

crypto/objects/obj_lcl.h:14:1: start of procedure lh_ADDED_OBJ_retrieve()
    12.   DEFINE_LHASH_OF(OBJ_NAME);
    13.   typedef struct added_obj_st ADDED_OBJ;
    14. > DEFINE_LHASH_OF(ADDED_OBJ);

crypto/lhash/lhash.c:165:1: start of procedure OPENSSL_LH_retrieve()
      163.   }
      164.   
      165. > void *OPENSSL_LH_retrieve(OPENSSL_LHASH *lh, const void *data)
      166.   {
      167.       unsigned long hash;

crypto/lhash/lhash.c:171:5: 
      169.       void *ret;
      170.   
      171. >     tsan_store((TSAN_QUALIFIER int *)&lh->error, 0);
      172.   
      173.       rn = getrn(lh, data, &hash);

crypto/lhash/lhash.c:173:5: Skipping getrn(): empty list of specs
      171.       tsan_store((TSAN_QUALIFIER int *)&lh->error, 0);
      172.   
      173.       rn = getrn(lh, data, &hash);
                 ^
      174.   
      175.       if (*rn == NULL) {

crypto/lhash/lhash.c:175:9: Taking false branch
      173.       rn = getrn(lh, data, &hash);
      174.   
      175.       if (*rn == NULL) {
                     ^
      176.           tsan_counter(&lh->num_retrieve_miss);
      177.           return NULL;

crypto/lhash/lhash.c:179:9: 
      177.           return NULL;
      178.       } else {
      179. >         ret = (*rn)->data;
      180.           tsan_counter(&lh->num_retrieve);
      181.       }

crypto/lhash/lhash.c:180:9: 
      178.       } else {
      179.           ret = (*rn)->data;
      180. >         tsan_counter(&lh->num_retrieve);
      181.       }
      182.   

crypto/lhash/lhash.c:183:5: 
      181.       }
      182.   
      183. >     return ret;
      184.   }
      185.   

crypto/lhash/lhash.c:184:1: return from a call to OPENSSL_LH_retrieve
      182.   
      183.       return ret;
      184. > }
      185.   
      186.   static void doall_util_fn(OPENSSL_LHASH *lh, int use_arg,

crypto/objects/obj_lcl.h:14:1: return from a call to lh_ADDED_OBJ_retrieve
    12.   DEFINE_LHASH_OF(OBJ_NAME);
    13.   typedef struct added_obj_st ADDED_OBJ;
    14. > DEFINE_LHASH_OF(ADDED_OBJ);

crypto/objects/obj_dat.c:346:13: Taking true branch
  344.           ad.obj = (ASN1_OBJECT *)a; /* XXX: ugly but harmless */
  345.           adp = lh_ADDED_OBJ_retrieve(added, &ad);
  346.           if (adp != NULL)
                     ^
  347.               return adp->obj->nid;
  348.       }

crypto/objects/obj_dat.c:347:13: 
  345.           adp = lh_ADDED_OBJ_retrieve(added, &ad);
  346.           if (adp != NULL)
  347. >             return adp->obj->nid;
  348.       }
  349.       op = OBJ_bsearch_obj(&a, obj_objs, NUM_OBJ);

crypto/objects/obj_dat.c:353:1: return from a call to OBJ_obj2nid
  351.           return NID_undef;
  352.       return nid_objs[*op].nid;
  353. > }
  354.   
  355.   /*

crypto/ec/ecx_meth.c:520:10: Taking false branch
518.       X509_ALGOR_get0(&obj, &ptype, NULL, sigalg);
519.       nid = OBJ_obj2nid(obj);
520.       if ((nid != NID_ED25519 && nid != NID_ED448) || ptype != V_ASN1_UNDEF) {
                ^
521.           ECerr(EC_F_ECD_ITEM_VERIFY, EC_R_INVALID_ENCODING);
522.           return 0;

crypto/ec/ecx_meth.c:520:53: Taking false branch
518.       X509_ALGOR_get0(&obj, &ptype, NULL, sigalg);
519.       nid = OBJ_obj2nid(obj);
520.       if ((nid != NID_ED25519 && nid != NID_ED448) || ptype != V_ASN1_UNDEF) {
                                                           ^
521.           ECerr(EC_F_ECD_ITEM_VERIFY, EC_R_INVALID_ENCODING);
522.           return 0;

crypto/ec/ecx_meth.c:525:10: 
523.       }
524.   
525. >     if (!EVP_DigestVerifyInit(ctx, NULL, NULL, NULL, pkey))
526.           return 0;
527.   
