crypto/property/property.c:488: error: INTEGER_OVERFLOW_L2
  ([0, `store->nelem`] - 1):unsigned64.
Showing all 3 steps of the trace


crypto/property/property.c:464:1: <LHS trace>
462.   }
463.   
464. > int ossl_method_store_cache_set(OSSL_METHOD_STORE *store, int nid,
465.                                   const char *prop_query, void *method)
466.   {

crypto/property/property.c:464:1: Parameter `store->nelem`
462.   }
463.   
464. > int ossl_method_store_cache_set(OSSL_METHOD_STORE *store, int nid,
465.                                   const char *prop_query, void *method)
466.   {

crypto/property/property.c:488:13: Binary operation: ([0, store->nelem] - 1):unsigned64
486.           elem.query = prop_query;
487.           if (lh_QUERY_delete(alg->cache, &elem) != NULL)
488.               store->nelem--;
                   ^
489.           ossl_property_unlock(store);
490.           return 1;

int ossl_method_store_cache_set(OSSL_METHOD_STORE *store, int nid,
                                const char *prop_query, void *method)
{
    QUERY elem, *old, *p = NULL;
    ALGORITHM *alg;
    size_t len;
    if (nid <= 0 || store == NULL)
        return 0;
    if (prop_query == NULL)
        return 1;
    ossl_property_write_lock(store);
    if (store->need_flush)
        ossl_method_cache_flush_some(store);
    alg = ossl_method_store_retrieve(store, nid);
    if (alg == NULL) {
        ossl_property_unlock(store);
        return 0;
    }
    if (method == NULL) {
        elem.query = prop_query;
        if (lh_QUERY_delete(alg->cache, &elem) != NULL)
            store->nelem--;
        ossl_property_unlock(store);
        return 1;
    }
    p = OPENSSL_malloc(sizeof(*p) + (len = strlen(prop_query)));
    if (p != NULL) {
        p->query = p->body;
        p->method = method;
        memcpy((char *)p->query, prop_query, len + 1);
        if ((old = lh_QUERY_insert(alg->cache, p)) != NULL) {
            OPENSSL_free(old);
            ossl_property_unlock(store);
            return 1;
        }
        if (!lh_QUERY_error(alg->cache)) {
            if (++store->nelem >= IMPL_CACHE_FLUSH_THRESHOLD)
                store->need_flush = 1;
            ossl_property_unlock(store);
            return 1;
        }
    }
    ossl_property_unlock(store);
    OPENSSL_free(p);
    return 0;
}
['int ossl_method_store_cache_set(OSSL_METHOD_STORE *store, int nid,\n                                const char *prop_query, void *method)\n{\n    QUERY elem, *old, *p = NULL;\n    ALGORITHM *alg;\n    size_t len;\n    if (nid <= 0 || store == NULL)\n        return 0;\n    if (prop_query == NULL)\n        return 1;\n    ossl_property_write_lock(store);\n    if (store->need_flush)\n        ossl_method_cache_flush_some(store);\n    alg = ossl_method_store_retrieve(store, nid);\n    if (alg == NULL) {\n        ossl_property_unlock(store);\n        return 0;\n    }\n    if (method == NULL) {\n        elem.query = prop_query;\n        if (lh_QUERY_delete(alg->cache, &elem) != NULL)\n            store->nelem--;\n        ossl_property_unlock(store);\n        return 1;\n    }\n    p = OPENSSL_malloc(sizeof(*p) + (len = strlen(prop_query)));\n    if (p != NULL) {\n        p->query = p->body;\n        p->method = method;\n        memcpy((char *)p->query, prop_query, len + 1);\n        if ((old = lh_QUERY_insert(alg->cache, p)) != NULL) {\n            OPENSSL_free(old);\n            ossl_property_unlock(store);\n            return 1;\n        }\n        if (!lh_QUERY_error(alg->cache)) {\n            if (++store->nelem >= IMPL_CACHE_FLUSH_THRESHOLD)\n                store->need_flush = 1;\n            ossl_property_unlock(store);\n            return 1;\n        }\n    }\n    ossl_property_unlock(store);\n    OPENSSL_free(p);\n    return 0;\n}']