test/handshake_helper.c:669: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned32 by call to `SSL_free`.
Showing all 18 steps of the trace


test/handshake_helper.c:541:14: Call
539.                               &server_ctx_data, &server2_ctx_data, &client_ctx_data);
540.   
541.       server = SSL_new(server_ctx);
                    ^
542.       client = SSL_new(client_ctx);
543.       OPENSSL_assert(server != NULL && client != NULL);

ssl/ssl_lib.c:522:1: Parameter `ctx->sessions->num_nodes`
  520.   }
  521.   
  522. > SSL *SSL_new(SSL_CTX *ctx)
  523.   {
  524.       SSL *s;

test/handshake_helper.c:542:14: Call
540.   
541.       server = SSL_new(server_ctx);
542.       client = SSL_new(client_ctx);
                    ^
543.       OPENSSL_assert(server != NULL && client != NULL);
544.   

ssl/ssl_lib.c:522:1: Parameter `ctx->sessions->num_nodes`
  520.   }
  521.   
  522. > SSL *SSL_new(SSL_CTX *ctx)
  523.   {
  524.       SSL *s;

test/handshake_helper.c:669:5: Call
667.       ctx_data_free_data(&client_ctx_data);
668.   
669.       SSL_free(server);
           ^
670.       SSL_free(client);
671.       return ret;

ssl/ssl_lib.c:963:1: Parameter `s->ctx->sessions->num_nodes`
  961.   }
  962.   
  963. > void SSL_free(SSL *s)
  964.   {
  965.       int i;

ssl/ssl_lib.c:1035:5: Call
  1033.       RECORD_LAYER_release(&s->rlayer);
  1034.   
  1035.       SSL_CTX_free(s->ctx);
              ^
  1036.   
  1037.       ASYNC_WAIT_CTX_free(s->waitctx);

ssl/ssl_lib.c:2466:1: Parameter `a->sessions->num_nodes`
    2464.   }
    2465.   
    2466. > void SSL_CTX_free(SSL_CTX *a)
    2467.   {
    2468.       int i;

ssl/ssl_lib.c:2492:9: Call
    2490.        */
    2491.       if (a->sessions != NULL)
    2492.           SSL_CTX_flush_sessions(a, 0);
                    ^
    2493.   
    2494.       CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data);

ssl/ssl_sess.c:968:1: Parameter `s->sessions->num_nodes`
      966.   IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
      967.   
      968. > void SSL_CTX_flush_sessions(SSL_CTX *s, long t)
      969.   {
      970.       unsigned long i;

ssl/ssl_sess.c:981:5: Call
      979.       i = lh_SSL_SESSION_get_down_load(s->sessions);
      980.       lh_SSL_SESSION_set_down_load(s->sessions, 0);
      981.       lh_SSL_SESSION_doall_TIMEOUT_PARAM(tp.cache, timeout_cb, &tp);
                 ^
      982.       lh_SSL_SESSION_set_down_load(s->sessions, i);
      983.       CRYPTO_THREAD_unlock(s->lock);

ssl/ssl_sess.c:966:1: Parameter `lh->num_nodes`
        964.   }
        965.   
        966. > IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
        967.   
        968.   void SSL_CTX_flush_sessions(SSL_CTX *s, long t)

ssl/ssl_sess.c:966:1: Call
        964.   }
        965.   
        966. > IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
        967.   
        968.   void SSL_CTX_flush_sessions(SSL_CTX *s, long t)

crypto/lhash/lhash.c:182:1: Parameter `lh->num_nodes`
          180.   }
          181.   
          182. > void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNCARG func, void *arg)
          183.   {
          184.       doall_util_fn(lh, 1, (OPENSSL_LH_DOALL_FUNC)0, func, arg);

crypto/lhash/lhash.c:184:5: Call
          182.   void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNCARG func, void *arg)
          183.   {
          184.       doall_util_fn(lh, 1, (OPENSSL_LH_DOALL_FUNC)0, func, arg);
                     ^
          185.   }
          186.   

crypto/lhash/lhash.c:150:1: <LHS trace>
148.   }
149.   
150. > static void doall_util_fn(OPENSSL_LHASH *lh, int use_arg,
151.                             OPENSSL_LH_DOALL_FUNC func,
152.                             OPENSSL_LH_DOALL_FUNCARG func_arg, void *arg)

crypto/lhash/lhash.c:150:1: Parameter `lh->num_nodes`
            148.   }
            149.   
            150. > static void doall_util_fn(OPENSSL_LHASH *lh, int use_arg,
            151.                             OPENSSL_LH_DOALL_FUNC func,
            152.                             OPENSSL_LH_DOALL_FUNCARG func_arg, void *arg)

crypto/lhash/lhash.c:164:10: Binary operation: ([0, +oo] - 1):unsigned32 by call to `SSL_free` 
            162.        * memory leaks otherwise
            163.        */
            164.       for (i = lh->num_nodes - 1; i >= 0; i--) {
                            ^
            165.           a = lh->b[i];
            166.           while (a != NULL) {

static void doall_util_fn(OPENSSL_LHASH *lh, int use_arg,
                          OPENSSL_LH_DOALL_FUNC func,
                          OPENSSL_LH_DOALL_FUNCARG func_arg, void *arg)
{
    int i;
    OPENSSL_LH_NODE *a, *n;
    if (lh == NULL)
        return;
    for (i = lh->num_nodes - 1; i >= 0; i--) {
        a = lh->b[i];
        while (a != NULL) {
            n = a->next;
            if (use_arg)
                func_arg(a->data, arg);
            else
                func(a->data);
            a = n;
        }
    }
}
['static HANDSHAKE_RESULT *do_handshake_internal(\n    SSL_CTX *server_ctx, SSL_CTX *server2_ctx, SSL_CTX *client_ctx,\n    const SSL_TEST_CTX *test_ctx, SSL_SESSION *session_in,\n    SSL_SESSION **session_out)\n{\n    SSL *server, *client;\n    BIO *client_to_server, *server_to_client;\n    HANDSHAKE_EX_DATA server_ex_data, client_ex_data;\n    CTX_DATA client_ctx_data, server_ctx_data, server2_ctx_data;\n    HANDSHAKE_RESULT *ret = HANDSHAKE_RESULT_new();\n    int client_turn = 1, shutdown = 0;\n    peer_status_t client_status = PEER_RETRY, server_status = PEER_RETRY;\n    handshake_status_t status = HANDSHAKE_RETRY;\n    unsigned char* tick = NULL;\n    size_t tick_len = 0;\n    SSL_SESSION* sess = NULL;\n    const unsigned char *proto = NULL;\n    unsigned int proto_len = 0;\n    memset(&server_ctx_data, 0, sizeof(server_ctx_data));\n    memset(&server2_ctx_data, 0, sizeof(server2_ctx_data));\n    memset(&client_ctx_data, 0, sizeof(client_ctx_data));\n    configure_handshake_ctx(server_ctx, server2_ctx, client_ctx, test_ctx,\n                            &server_ctx_data, &server2_ctx_data, &client_ctx_data);\n    server = SSL_new(server_ctx);\n    client = SSL_new(client_ctx);\n    OPENSSL_assert(server != NULL && client != NULL);\n    configure_handshake_ssl(server, client, test_ctx);\n    if (session_in != NULL) {\n        OPENSSL_assert(SSL_CTX_add_session(server_ctx, session_in));\n        OPENSSL_assert(SSL_set_session(client, session_in));\n    }\n    memset(&server_ex_data, 0, sizeof(server_ex_data));\n    memset(&client_ex_data, 0, sizeof(client_ex_data));\n    ret->result = SSL_TEST_INTERNAL_ERROR;\n    client_to_server = BIO_new(BIO_s_mem());\n    server_to_client = BIO_new(BIO_s_mem());\n    OPENSSL_assert(client_to_server != NULL && server_to_client != NULL);\n    BIO_set_nbio(client_to_server, 1);\n    BIO_set_nbio(server_to_client, 1);\n    SSL_set_connect_state(client);\n    SSL_set_accept_state(server);\n    SSL_set_bio(client, server_to_client, client_to_server);\n    OPENSSL_assert(BIO_up_ref(server_to_client) > 0);\n    OPENSSL_assert(BIO_up_ref(client_to_server) > 0);\n    SSL_set_bio(server, client_to_server, server_to_client);\n    ex_data_idx = SSL_get_ex_new_index(0, "ex data", NULL, NULL, NULL);\n    OPENSSL_assert(ex_data_idx >= 0);\n    OPENSSL_assert(SSL_set_ex_data(server, ex_data_idx,\n                                   &server_ex_data) == 1);\n    OPENSSL_assert(SSL_set_ex_data(client, ex_data_idx,\n                                   &client_ex_data) == 1);\n    SSL_set_info_callback(server, &info_cb);\n    SSL_set_info_callback(client, &info_cb);\n    for(;;) {\n        if (client_turn) {\n            client_status = do_handshake_step(client, shutdown);\n            status = handshake_status(client_status, server_status,\n                                      1  );\n        } else {\n            server_status = do_handshake_step(server, shutdown);\n            status = handshake_status(server_status, client_status,\n                                      0  );\n        }\n        switch (status) {\n        case HANDSHAKE_SUCCESS:\n            if (shutdown) {\n                ret->result = SSL_TEST_SUCCESS;\n                goto err;\n            } else {\n                client_status = server_status = PEER_RETRY;\n                shutdown = 1;\n                client_turn = 1;\n                break;\n            }\n        case CLIENT_ERROR:\n            ret->result = SSL_TEST_CLIENT_FAIL;\n            goto err;\n        case SERVER_ERROR:\n            ret->result = SSL_TEST_SERVER_FAIL;\n            goto err;\n        case INTERNAL_ERROR:\n            ret->result = SSL_TEST_INTERNAL_ERROR;\n            goto err;\n        case HANDSHAKE_RETRY:\n            client_turn ^= 1;\n            break;\n        }\n    }\n err:\n    ret->server_alert_sent = server_ex_data.alert_sent;\n    ret->server_alert_received = client_ex_data.alert_received;\n    ret->client_alert_sent = client_ex_data.alert_sent;\n    ret->client_alert_received = server_ex_data.alert_received;\n    ret->server_protocol = SSL_version(server);\n    ret->client_protocol = SSL_version(client);\n    ret->servername = server_ex_data.servername;\n    if ((sess = SSL_get0_session(client)) != NULL)\n        SSL_SESSION_get0_ticket(sess, &tick, &tick_len);\n    if (tick == NULL || tick_len == 0)\n        ret->session_ticket = SSL_TEST_SESSION_TICKET_NO;\n    else\n        ret->session_ticket = SSL_TEST_SESSION_TICKET_YES;\n    ret->session_ticket_do_not_call = server_ex_data.session_ticket_do_not_call;\n    SSL_get0_next_proto_negotiated(client, &proto, &proto_len);\n    ret->client_npn_negotiated = dup_str(proto, proto_len);\n    SSL_get0_next_proto_negotiated(server, &proto, &proto_len);\n    ret->server_npn_negotiated = dup_str(proto, proto_len);\n    SSL_get0_alpn_selected(client, &proto, &proto_len);\n    ret->client_alpn_negotiated = dup_str(proto, proto_len);\n    SSL_get0_alpn_selected(server, &proto, &proto_len);\n    ret->server_alpn_negotiated = dup_str(proto, proto_len);\n    ret->client_resumed = SSL_session_reused(client);\n    ret->server_resumed = SSL_session_reused(server);\n    if (session_out != NULL)\n        *session_out = SSL_get1_session(client);\n    ctx_data_free_data(&server_ctx_data);\n    ctx_data_free_data(&server2_ctx_data);\n    ctx_data_free_data(&client_ctx_data);\n    SSL_free(server);\n    SSL_free(client);\n    return ret;\n}', 'SSL *SSL_new(SSL_CTX *ctx)\n{\n    SSL *s;\n    if (ctx == NULL) {\n        SSLerr(SSL_F_SSL_NEW, SSL_R_NULL_SSL_CTX);\n        return (NULL);\n    }\n    if (ctx->method == NULL) {\n        SSLerr(SSL_F_SSL_NEW, SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION);\n        return (NULL);\n    }\n    s = OPENSSL_zalloc(sizeof(*s));\n    if (s == NULL)\n        goto err;\n    s->lock = CRYPTO_THREAD_lock_new();\n    if (s->lock == NULL) {\n        SSLerr(SSL_F_SSL_NEW, ERR_R_MALLOC_FAILURE);\n        OPENSSL_free(s);\n        return NULL;\n    }\n    RECORD_LAYER_init(&s->rlayer, s);\n    s->options = ctx->options;\n    s->dane.flags = ctx->dane.flags;\n    s->min_proto_version = ctx->min_proto_version;\n    s->max_proto_version = ctx->max_proto_version;\n    s->mode = ctx->mode;\n    s->max_cert_list = ctx->max_cert_list;\n    s->references = 1;\n    s->cert = ssl_cert_dup(ctx->cert);\n    if (s->cert == NULL)\n        goto err;\n    RECORD_LAYER_set_read_ahead(&s->rlayer, ctx->read_ahead);\n    s->msg_callback = ctx->msg_callback;\n    s->msg_callback_arg = ctx->msg_callback_arg;\n    s->verify_mode = ctx->verify_mode;\n    s->not_resumable_session_cb = ctx->not_resumable_session_cb;\n    s->sid_ctx_length = ctx->sid_ctx_length;\n    OPENSSL_assert(s->sid_ctx_length <= sizeof s->sid_ctx);\n    memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx));\n    s->verify_callback = ctx->default_verify_callback;\n    s->generate_session_id = ctx->generate_session_id;\n    s->param = X509_VERIFY_PARAM_new();\n    if (s->param == NULL)\n        goto err;\n    X509_VERIFY_PARAM_inherit(s->param, ctx->param);\n    s->quiet_shutdown = ctx->quiet_shutdown;\n    s->max_send_fragment = ctx->max_send_fragment;\n    s->split_send_fragment = ctx->split_send_fragment;\n    s->max_pipelines = ctx->max_pipelines;\n    if (s->max_pipelines > 1)\n        RECORD_LAYER_set_read_ahead(&s->rlayer, 1);\n    if (ctx->default_read_buf_len > 0)\n        SSL_set_default_read_buffer_len(s, ctx->default_read_buf_len);\n    SSL_CTX_up_ref(ctx);\n    s->ctx = ctx;\n    s->tlsext_debug_cb = 0;\n    s->tlsext_debug_arg = NULL;\n    s->tlsext_ticket_expected = 0;\n    s->tlsext_status_type = ctx->tlsext_status_type;\n    s->tlsext_status_expected = 0;\n    s->tlsext_ocsp_ids = NULL;\n    s->tlsext_ocsp_exts = NULL;\n    s->tlsext_ocsp_resp = NULL;\n    s->tlsext_ocsp_resplen = -1;\n    SSL_CTX_up_ref(ctx);\n    s->initial_ctx = ctx;\n# ifndef OPENSSL_NO_EC\n    if (ctx->tlsext_ecpointformatlist) {\n        s->tlsext_ecpointformatlist =\n            OPENSSL_memdup(ctx->tlsext_ecpointformatlist,\n                           ctx->tlsext_ecpointformatlist_length);\n        if (!s->tlsext_ecpointformatlist)\n            goto err;\n        s->tlsext_ecpointformatlist_length =\n            ctx->tlsext_ecpointformatlist_length;\n    }\n    if (ctx->tlsext_ellipticcurvelist) {\n        s->tlsext_ellipticcurvelist =\n            OPENSSL_memdup(ctx->tlsext_ellipticcurvelist,\n                           ctx->tlsext_ellipticcurvelist_length);\n        if (!s->tlsext_ellipticcurvelist)\n            goto err;\n        s->tlsext_ellipticcurvelist_length =\n            ctx->tlsext_ellipticcurvelist_length;\n    }\n# endif\n# ifndef OPENSSL_NO_NEXTPROTONEG\n    s->next_proto_negotiated = NULL;\n# endif\n    if (s->ctx->alpn_client_proto_list) {\n        s->alpn_client_proto_list =\n            OPENSSL_malloc(s->ctx->alpn_client_proto_list_len);\n        if (s->alpn_client_proto_list == NULL)\n            goto err;\n        memcpy(s->alpn_client_proto_list, s->ctx->alpn_client_proto_list,\n               s->ctx->alpn_client_proto_list_len);\n        s->alpn_client_proto_list_len = s->ctx->alpn_client_proto_list_len;\n    }\n    s->verified_chain = NULL;\n    s->verify_result = X509_V_OK;\n    s->default_passwd_callback = ctx->default_passwd_callback;\n    s->default_passwd_callback_userdata = ctx->default_passwd_callback_userdata;\n    s->method = ctx->method;\n    if (!s->method->ssl_new(s))\n        goto err;\n    s->server = (ctx->method->ssl_accept == ssl_undefined_function) ? 0 : 1;\n    if (!SSL_clear(s))\n        goto err;\n    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL, s, &s->ex_data))\n        goto err;\n#ifndef OPENSSL_NO_PSK\n    s->psk_client_callback = ctx->psk_client_callback;\n    s->psk_server_callback = ctx->psk_server_callback;\n#endif\n    s->job = NULL;\n#ifndef OPENSSL_NO_CT\n    if (!SSL_set_ct_validation_callback(s, ctx->ct_validation_callback,\n            ctx->ct_validation_callback_arg))\n        goto err;\n#endif\n    return s;\n err:\n    SSL_free(s);\n    SSLerr(SSL_F_SSL_NEW, ERR_R_MALLOC_FAILURE);\n    return NULL;\n}', 'void SSL_free(SSL *s)\n{\n    int i;\n    if (s == NULL)\n        return;\n    CRYPTO_atomic_add(&s->references, -1, &i, s->lock);\n    REF_PRINT_COUNT("SSL", s);\n    if (i > 0)\n        return;\n    REF_ASSERT_ISNT(i < 0);\n    X509_VERIFY_PARAM_free(s->param);\n    dane_final(&s->dane);\n    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL, s, &s->ex_data);\n    if (s->bbio != NULL) {\n        if (s->bbio == s->wbio) {\n            s->wbio = BIO_pop(s->wbio);\n        }\n        BIO_free(s->bbio);\n        s->bbio = NULL;\n    }\n    if (s->wbio != s->rbio)\n        BIO_free_all(s->wbio);\n    BIO_free_all(s->rbio);\n    BUF_MEM_free(s->init_buf);\n    sk_SSL_CIPHER_free(s->cipher_list);\n    sk_SSL_CIPHER_free(s->cipher_list_by_id);\n    if (s->session != NULL) {\n        ssl_clear_bad_session(s);\n        SSL_SESSION_free(s->session);\n    }\n    clear_ciphers(s);\n    ssl_cert_free(s->cert);\n    OPENSSL_free(s->tlsext_hostname);\n    SSL_CTX_free(s->initial_ctx);\n#ifndef OPENSSL_NO_EC\n    OPENSSL_free(s->tlsext_ecpointformatlist);\n    OPENSSL_free(s->tlsext_ellipticcurvelist);\n#endif\n    sk_X509_EXTENSION_pop_free(s->tlsext_ocsp_exts, X509_EXTENSION_free);\n#ifndef OPENSSL_NO_OCSP\n    sk_OCSP_RESPID_pop_free(s->tlsext_ocsp_ids, OCSP_RESPID_free);\n#endif\n#ifndef OPENSSL_NO_CT\n    SCT_LIST_free(s->scts);\n    OPENSSL_free(s->tlsext_scts);\n#endif\n    OPENSSL_free(s->tlsext_ocsp_resp);\n    OPENSSL_free(s->alpn_client_proto_list);\n    sk_X509_NAME_pop_free(s->client_CA, X509_NAME_free);\n    sk_X509_pop_free(s->verified_chain, X509_free);\n    if (s->method != NULL)\n        s->method->ssl_free(s);\n    RECORD_LAYER_release(&s->rlayer);\n    SSL_CTX_free(s->ctx);\n    ASYNC_WAIT_CTX_free(s->waitctx);\n#if !defined(OPENSSL_NO_NEXTPROTONEG)\n    OPENSSL_free(s->next_proto_negotiated);\n#endif\n#ifndef OPENSSL_NO_SRTP\n    sk_SRTP_PROTECTION_PROFILE_free(s->srtp_profiles);\n#endif\n    CRYPTO_THREAD_lock_free(s->lock);\n    OPENSSL_free(s);\n}', 'void SSL_CTX_free(SSL_CTX *a)\n{\n    int i;\n    if (a == NULL)\n        return;\n    CRYPTO_atomic_add(&a->references, -1, &i, a->lock);\n    REF_PRINT_COUNT("SSL_CTX", a);\n    if (i > 0)\n        return;\n    REF_ASSERT_ISNT(i < 0);\n    X509_VERIFY_PARAM_free(a->param);\n    dane_ctx_final(&a->dane);\n    if (a->sessions != NULL)\n        SSL_CTX_flush_sessions(a, 0);\n    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data);\n    lh_SSL_SESSION_free(a->sessions);\n    X509_STORE_free(a->cert_store);\n#ifndef OPENSSL_NO_CT\n    CTLOG_STORE_free(a->ctlog_store);\n#endif\n    sk_SSL_CIPHER_free(a->cipher_list);\n    sk_SSL_CIPHER_free(a->cipher_list_by_id);\n    ssl_cert_free(a->cert);\n    sk_X509_NAME_pop_free(a->client_CA, X509_NAME_free);\n    sk_X509_pop_free(a->extra_certs, X509_free);\n    a->comp_methods = NULL;\n#ifndef OPENSSL_NO_SRTP\n    sk_SRTP_PROTECTION_PROFILE_free(a->srtp_profiles);\n#endif\n#ifndef OPENSSL_NO_SRP\n    SSL_CTX_SRP_CTX_free(a);\n#endif\n#ifndef OPENSSL_NO_ENGINE\n    ENGINE_finish(a->client_cert_engine);\n#endif\n#ifndef OPENSSL_NO_EC\n    OPENSSL_free(a->tlsext_ecpointformatlist);\n    OPENSSL_free(a->tlsext_ellipticcurvelist);\n#endif\n    OPENSSL_free(a->alpn_client_proto_list);\n    CRYPTO_THREAD_lock_free(a->lock);\n    OPENSSL_free(a);\n}', 'void SSL_CTX_flush_sessions(SSL_CTX *s, long t)\n{\n    unsigned long i;\n    TIMEOUT_PARAM tp;\n    tp.ctx = s;\n    tp.cache = s->sessions;\n    if (tp.cache == NULL)\n        return;\n    tp.time = t;\n    CRYPTO_THREAD_write_lock(s->lock);\n    i = lh_SSL_SESSION_get_down_load(s->sessions);\n    lh_SSL_SESSION_set_down_load(s->sessions, 0);\n    lh_SSL_SESSION_doall_TIMEOUT_PARAM(tp.cache, timeout_cb, &tp);\n    lh_SSL_SESSION_set_down_load(s->sessions, i);\n    CRYPTO_THREAD_unlock(s->lock);\n}', 'IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM)', 'void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNCARG func, void *arg)\n{\n    doall_util_fn(lh, 1, (OPENSSL_LH_DOALL_FUNC)0, func, arg);\n}', 'static void doall_util_fn(OPENSSL_LHASH *lh, int use_arg,\n                          OPENSSL_LH_DOALL_FUNC func,\n                          OPENSSL_LH_DOALL_FUNCARG func_arg, void *arg)\n{\n    int i;\n    OPENSSL_LH_NODE *a, *n;\n    if (lh == NULL)\n        return;\n    for (i = lh->num_nodes - 1; i >= 0; i--) {\n        a = lh->b[i];\n        while (a != NULL) {\n            n = a->next;\n            if (use_arg)\n                func_arg(a->data, arg);\n            else\n                func(a->data);\n            a = n;\n        }\n    }\n}']