crypto/evp/evp_fetch.c:85: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `ossl_namemap_add`.
Showing all 8 steps of the trace


crypto/evp/evp_fetch.c:85:18: Call
83.   
84.       if ((namemap = ossl_namemap_stored(libctx)) == NULL
85.           || (id = ossl_namemap_add(namemap, name)) == 0)
                       ^
86.           return NULL;
87.   

crypto/core_namemap.c:166:1: Parameter `namemap->namenum->num_items`
  164.   }
  165.   
  166. > int ossl_namemap_add(OSSL_NAMEMAP *namemap, const char *name)
  167.   {
  168.       NAMEMAP_ENTRY *entry;

crypto/core_namemap.c:207:9: Call
  205.           if (entry->number != 0)
  206.               (void)sk_NAMEMAP_ENTRY_pop(namemap->numname);
  207.           lh_NAMEMAP_ENTRY_delete(namemap->namenum, entry);
                 ^
  208.           CRYPTO_THREAD_unlock(namemap->lock);
  209.       }

crypto/core_namemap.c:21:1: Parameter `lh->num_items`
    19.   } NAMEMAP_ENTRY;
    20.   
    21. > DEFINE_LHASH_OF(NAMEMAP_ENTRY);
    22.   DEFINE_STACK_OF(NAMEMAP_ENTRY)
    23.   

crypto/core_namemap.c:21:1: Call
    19.   } NAMEMAP_ENTRY;
    20.   
    21. > DEFINE_LHASH_OF(NAMEMAP_ENTRY);
    22.   DEFINE_STACK_OF(NAMEMAP_ENTRY)
    23.   

crypto/lhash/lhash.c:137:1: <LHS trace>
135.   }
136.   
137. > void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data)
138.   {
139.       unsigned long hash;

crypto/lhash/lhash.c:137:1: Parameter `lh->num_items`
      135.   }
      136.   
      137. > void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data)
      138.   {
      139.       unsigned long hash;

crypto/lhash/lhash.c:157:5: Binary operation: ([0, +oo] - 1):unsigned64 by call to `ossl_namemap_add` 
      155.       }
      156.   
      157.       lh->num_items--;
                 ^
      158.       if ((lh->num_nodes > MIN_NODES) &&
      159.           (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))

void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data)
{
    unsigned long hash;
    OPENSSL_LH_NODE *nn, **rn;
    void *ret;
    lh->error = 0;
    rn = getrn(lh, data, &hash);
    if (*rn == NULL) {
        lh->num_no_delete++;
        return NULL;
    } else {
        nn = *rn;
        *rn = nn->next;
        ret = nn->data;
        OPENSSL_free(nn);
        lh->num_delete++;
    }
    lh->num_items--;
    if ((lh->num_nodes > MIN_NODES) &&
        (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))
        contract(lh);
    return ret;
}
['static void *get_method_from_store(OPENSSL_CTX *libctx, void *store,\n                                   const char *name, const char *propquery,\n                                   void *data)\n{\n    struct method_data_st *methdata = data;\n    void *method = NULL;\n    OSSL_NAMEMAP *namemap;\n    int id;\n    if (store == NULL\n        && (store = get_default_method_store(libctx)) == NULL)\n        return NULL;\n    if ((namemap = ossl_namemap_stored(libctx)) == NULL\n        || (id = ossl_namemap_add(namemap, name)) == 0)\n        return NULL;\n    (void)ossl_method_store_fetch(store, id, propquery, &method);\n    if (method != NULL\n        && !methdata->refcnt_up_method(method)) {\n        method = NULL;\n    }\n    return method;\n}', 'int ossl_namemap_add(OSSL_NAMEMAP *namemap, const char *name)\n{\n    NAMEMAP_ENTRY *entry;\n    int number;\n#ifndef FIPS_MODE\n    if (namemap == NULL)\n        namemap = ossl_namemap_stored(NULL);\n#endif\n    if (name == NULL || namemap == NULL)\n        return 0;\n    if ((number = ossl_namemap_number(namemap, name)) != 0)\n        return number;\n    if ((entry = OPENSSL_zalloc(sizeof(*entry) + strlen(name))) == NULL)\n        goto err;\n    strcpy(entry->body, name);\n    entry->name = entry->body;\n    CRYPTO_THREAD_write_lock(namemap->lock);\n    entry->number = sk_NAMEMAP_ENTRY_push(namemap->numname, entry);\n    if (entry->number == 0)\n        goto err;\n    (void)lh_NAMEMAP_ENTRY_insert(namemap->namenum, entry);\n    if (lh_NAMEMAP_ENTRY_error(namemap->namenum))\n        goto err;\n    CRYPTO_THREAD_unlock(namemap->lock);\n    return entry->number;\n err:\n    if (entry != NULL) {\n        if (entry->number != 0)\n            (void)sk_NAMEMAP_ENTRY_pop(namemap->numname);\n        lh_NAMEMAP_ENTRY_delete(namemap->namenum, entry);\n        CRYPTO_THREAD_unlock(namemap->lock);\n    }\n    return 0;\n}', 'DEFINE_LHASH_OF(NAMEMAP_ENTRY)', 'void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data)\n{\n    unsigned long hash;\n    OPENSSL_LH_NODE *nn, **rn;\n    void *ret;\n    lh->error = 0;\n    rn = getrn(lh, data, &hash);\n    if (*rn == NULL) {\n        lh->num_no_delete++;\n        return NULL;\n    } else {\n        nn = *rn;\n        *rn = nn->next;\n        ret = nn->data;\n        OPENSSL_free(nn);\n        lh->num_delete++;\n    }\n    lh->num_items--;\n    if ((lh->num_nodes > MIN_NODES) &&\n        (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))\n        contract(lh);\n    return ret;\n}']