crypto/evp/evp_fetch.c:126: 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:126:22: Call
124.   
125.       if ((namemap = ossl_namemap_stored(methdata->libctx)) == NULL
126.           || (nameid = ossl_namemap_add(namemap, name)) == 0
                            ^
127.           || (methid = method_id(operation_id, nameid)) == 0)
128.           return 0;

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 int put_method_in_store(OPENSSL_CTX *libctx, void *store,\n                               void *method, int operation_id,\n                               const char *name, const char *propdef,\n                               void *data)\n{\n    struct method_data_st *methdata = data;\n    OSSL_NAMEMAP *namemap;\n    int nameid;\n    uint32_t methid;\n    if ((namemap = ossl_namemap_stored(methdata->libctx)) == NULL\n        || (nameid = ossl_namemap_add(namemap, name)) == 0\n        || (methid = method_id(operation_id, nameid)) == 0)\n        return 0;\n    if (store == NULL\n        && (store = get_default_method_store(libctx)) == NULL)\n        return 0;\n    if (methdata->refcnt_up_method(method)\n        && ossl_method_store_add(store, methid, propdef, method,\n                                 methdata->destruct_method))\n        return 1;\n    return 0;\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}']