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


test/clienthellotest.c:78:11: Call
76.        * produced when we try to connect
77.        */
78.       ctx = SSL_CTX_new(TLS_method());
                ^
79.       if (ctx == NULL)
80.           goto end;

ssl/ssl_lib.c:2661:21: Call
  2659.           goto err;
  2660.   
  2661.       ret->sessions = lh_SSL_SESSION_new(ssl_session_hash, ssl_session_cmp);
                              ^
  2662.       if (ret->sessions == NULL)
  2663.           goto err;

ssl/ssl_locl.h:689:1: Call
    687.   } CLIENTHELLO_MSG;
    688.   
    689. > DEFINE_LHASH_OF(SSL_SESSION);
    690.   /* Needed in ssl_cert.c */
    691.   DEFINE_LHASH_OF(X509_NAME);

crypto/lhash/lhash.c:37:5: Assignment
      35.       ret->comp = ((c == NULL) ? (OPENSSL_LH_COMPFUNC)strcmp : c);
      36.       ret->hash = ((h == NULL) ? (OPENSSL_LH_HASHFUNC)OPENSSL_LH_strhash : h);
      37.       ret->num_nodes = MIN_NODES / 2;
                ^
      38.       ret->num_alloc_nodes = MIN_NODES;
      39.       ret->pmax = MIN_NODES / 2;

test/clienthellotest.c:227:5: Call
225.   
226.   end:
227.       SSL_free(con);
           ^
228.       SSL_CTX_free(ctx);
229.       SSL_SESSION_free(sess);

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:1030:5: Call
  1028.       RECORD_LAYER_release(&s->rlayer);
  1029.   
  1030.       SSL_CTX_free(s->ctx);
              ^
  1031.   
  1032.       ASYNC_WAIT_CTX_free(s->waitctx);

ssl/ssl_lib.c:2778:1: Parameter `a->sessions->num_nodes`
    2776.   }
    2777.   
    2778. > void SSL_CTX_free(SSL_CTX *a)
    2779.   {
    2780.       int i;

ssl/ssl_lib.c:2804:9: Call
    2802.        */
    2803.       if (a->sessions != NULL)
    2804.           SSL_CTX_flush_sessions(a, 0);
                    ^
    2805.   
    2806.       CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data);

ssl/ssl_sess.c:1020:1: Parameter `s->sessions->num_nodes`
      1018.   IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
      1019.   
      1020. > void SSL_CTX_flush_sessions(SSL_CTX *s, long t)
      1021.   {
      1022.       unsigned long i;

ssl/ssl_sess.c:1033:5: Call
      1031.       i = lh_SSL_SESSION_get_down_load(s->sessions);
      1032.       lh_SSL_SESSION_set_down_load(s->sessions, 0);
      1033.       lh_SSL_SESSION_doall_TIMEOUT_PARAM(tp.cache, timeout_cb, &tp);
                  ^
      1034.       lh_SSL_SESSION_set_down_load(s->sessions, i);
      1035.       CRYPTO_THREAD_unlock(s->lock);

ssl/ssl_sess.c:1018:1: Parameter `lh->num_nodes`
        1016.   }
        1017.   
        1018. > IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
        1019.   
        1020.   void SSL_CTX_flush_sessions(SSL_CTX *s, long t)

ssl/ssl_sess.c:1018:1: Call
        1016.   }
        1017.   
        1018. > IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
        1019.   
        1020.   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, 8] - 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 int test_client_hello(int currtest)\n{\n    SSL_CTX *ctx;\n    SSL *con = NULL;\n    BIO *rbio;\n    BIO *wbio;\n    long len;\n    unsigned char *data;\n    PACKET pkt, pkt2, pkt3;\n    char *dummytick = "Hello World!";\n    unsigned int type;\n    int testresult = 0;\n    size_t msglen;\n    BIO *sessbio = NULL;\n    SSL_SESSION *sess = NULL;\n#ifdef OPENSSL_NO_TLS1_3\n    if (currtest == TEST_ADD_PADDING_AND_PSK)\n        return 1;\n#endif\n    ctx = SSL_CTX_new(TLS_method());\n    if (ctx == NULL)\n        goto end;\n    switch(currtest) {\n    case TEST_SET_SESSION_TICK_DATA_VER_NEG:\n        if (!SSL_CTX_set_max_proto_version(ctx, TLS1_2_VERSION))\n            goto end;\n        break;\n    case TEST_ADD_PADDING_AND_PSK:\n    case TEST_ADD_PADDING:\n    case TEST_PADDING_NOT_NEEDED:\n        SSL_CTX_set_options(ctx, SSL_OP_TLSEXT_PADDING);\n        if (currtest == TEST_ADD_PADDING\n                && (!SSL_CTX_set_cipher_list(ctx, "ALL")\n                    || SSL_CTX_set_alpn_protos(ctx,\n                                               (unsigned char *)alpn_prots,\n                                               sizeof(alpn_prots) - 1)))\n            goto end;\n        else if (currtest == TEST_PADDING_NOT_NEEDED)\n            testresult = 1;\n        break;\n    default:\n        goto end;\n    }\n    con = SSL_new(ctx);\n    if (con == NULL)\n        goto end;\n    if (currtest == TEST_ADD_PADDING_AND_PSK) {\n        sessbio = BIO_new_file(sessionfile, "r");\n        if (sessbio == NULL) {\n            printf("Unable to open session.pem\\n");\n            goto end;\n        }\n        sess = PEM_read_bio_SSL_SESSION(sessbio, NULL, NULL, NULL);\n        if (sess == NULL) {\n            printf("Unable to load SSL_SESSION\\n");\n            goto end;\n        }\n        if (!SSL_SESSION_set_time(sess, time(NULL))) {\n            printf("Unable to set creation time on SSL_SESSION\\n");\n            goto end;\n        }\n        if (!SSL_set_session(con, sess)) {\n            printf("Unable to set the session on the connection\\n");\n            goto end;\n        }\n    }\n    rbio = BIO_new(BIO_s_mem());\n    wbio = BIO_new(BIO_s_mem());\n    if (rbio == NULL || wbio == NULL) {\n        BIO_free(rbio);\n        BIO_free(wbio);\n        goto end;\n    }\n    SSL_set_bio(con, rbio, wbio);\n    SSL_set_connect_state(con);\n    if (currtest == TEST_SET_SESSION_TICK_DATA_VER_NEG) {\n        if (!SSL_set_session_ticket_ext(con, dummytick, strlen(dummytick)))\n            goto end;\n    }\n    if (SSL_connect(con) > 0) {\n        goto end;\n    }\n    len = BIO_get_mem_data(wbio, (char **)&data);\n    if (!PACKET_buf_init(&pkt, data, len))\n        goto end;\n    if (!PACKET_forward(&pkt, SSL3_RT_HEADER_LENGTH))\n        goto end;\n    msglen = PACKET_remaining(&pkt);\n    if (!PACKET_forward(&pkt, SSL3_HM_HEADER_LENGTH))\n        goto end;\n    if (!PACKET_forward(&pkt, CLIENT_VERSION_LEN + SSL3_RANDOM_SIZE))\n        goto end;\n    if (!PACKET_get_length_prefixed_1(&pkt, &pkt2))\n        goto end;\n    if (!PACKET_get_length_prefixed_2(&pkt, &pkt2))\n        goto end;\n    if (!PACKET_get_length_prefixed_1(&pkt, &pkt2))\n        goto end;\n    if (!PACKET_as_length_prefixed_2(&pkt, &pkt2))\n        goto end;\n    while (PACKET_remaining(&pkt2)) {\n        if (!PACKET_get_net_2(&pkt2, &type) ||\n            !PACKET_get_length_prefixed_2(&pkt2, &pkt3))\n            goto end;\n        if (type == TLSEXT_TYPE_session_ticket) {\n            if (currtest == TEST_SET_SESSION_TICK_DATA_VER_NEG) {\n                if (PACKET_equal(&pkt3, dummytick, strlen(dummytick))) {\n                    testresult = 1;\n                } else {\n                    printf("Received session ticket is not as expected\\n");\n                }\n                break;\n            }\n        }\n        if (type == TLSEXT_TYPE_padding) {\n            if (currtest == TEST_ADD_PADDING\n                    || currtest == TEST_ADD_PADDING_AND_PSK)\n                testresult = (msglen == F5_WORKAROUND_MAX_MSG_LEN);\n            else\n                testresult = 0;\n        }\n    }\nend:\n    SSL_free(con);\n    SSL_CTX_free(ctx);\n    SSL_SESSION_free(sess);\n    BIO_free(sessbio);\n    if (!testresult)\n        printf("ClientHello test: FAILED (Test %d)\\n", currtest);\n    return testresult;\n}', 'SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth)\n{\n    SSL_CTX *ret = NULL;\n    if (meth == NULL) {\n        SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_NULL_SSL_METHOD_PASSED);\n        return (NULL);\n    }\n    if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL))\n        return NULL;\n    if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0) {\n        SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_X509_VERIFICATION_SETUP_PROBLEMS);\n        goto err;\n    }\n    ret = OPENSSL_zalloc(sizeof(*ret));\n    if (ret == NULL)\n        goto err;\n    ret->method = meth;\n    ret->min_proto_version = 0;\n    ret->max_proto_version = 0;\n    ret->session_cache_mode = SSL_SESS_CACHE_SERVER;\n    ret->session_cache_size = SSL_SESSION_CACHE_MAX_SIZE_DEFAULT;\n    ret->session_timeout = meth->get_timeout();\n    ret->references = 1;\n    ret->lock = CRYPTO_THREAD_lock_new();\n    if (ret->lock == NULL) {\n        SSLerr(SSL_F_SSL_CTX_NEW, ERR_R_MALLOC_FAILURE);\n        OPENSSL_free(ret);\n        return NULL;\n    }\n    ret->max_cert_list = SSL_MAX_CERT_LIST_DEFAULT;\n    ret->verify_mode = SSL_VERIFY_NONE;\n    if ((ret->cert = ssl_cert_new()) == NULL)\n        goto err;\n    ret->sessions = lh_SSL_SESSION_new(ssl_session_hash, ssl_session_cmp);\n    if (ret->sessions == NULL)\n        goto err;\n    ret->cert_store = X509_STORE_new();\n    if (ret->cert_store == NULL)\n        goto err;\n#ifndef OPENSSL_NO_CT\n    ret->ctlog_store = CTLOG_STORE_new();\n    if (ret->ctlog_store == NULL)\n        goto err;\n#endif\n    if (!ssl_create_cipher_list(ret->method,\n                                &ret->cipher_list, &ret->cipher_list_by_id,\n                                SSL_DEFAULT_CIPHER_LIST, ret->cert)\n        || sk_SSL_CIPHER_num(ret->cipher_list) <= 0) {\n        SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_LIBRARY_HAS_NO_CIPHERS);\n        goto err2;\n    }\n    ret->param = X509_VERIFY_PARAM_new();\n    if (ret->param == NULL)\n        goto err;\n    if ((ret->md5 = EVP_get_digestbyname("ssl3-md5")) == NULL) {\n        SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES);\n        goto err2;\n    }\n    if ((ret->sha1 = EVP_get_digestbyname("ssl3-sha1")) == NULL) {\n        SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES);\n        goto err2;\n    }\n    if ((ret->client_CA = sk_X509_NAME_new_null()) == NULL)\n        goto err;\n    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_CTX, ret, &ret->ex_data))\n        goto err;\n    if (!(meth->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS))\n        ret->comp_methods = SSL_COMP_get_compression_methods();\n    ret->max_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH;\n    ret->split_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH;\n    if ((RAND_bytes(ret->ext.tick_key_name,\n                    sizeof(ret->ext.tick_key_name)) <= 0)\n        || (RAND_bytes(ret->ext.tick_hmac_key,\n                       sizeof(ret->ext.tick_hmac_key)) <= 0)\n        || (RAND_bytes(ret->ext.tick_aes_key,\n                       sizeof(ret->ext.tick_aes_key)) <= 0))\n        ret->options |= SSL_OP_NO_TICKET;\n#ifndef OPENSSL_NO_SRP\n    if (!SSL_CTX_SRP_CTX_init(ret))\n        goto err;\n#endif\n#ifndef OPENSSL_NO_ENGINE\n# ifdef OPENSSL_SSL_CLIENT_ENGINE_AUTO\n#  define eng_strx(x)     #x\n#  define eng_str(x)      eng_strx(x)\n    {\n        ENGINE *eng;\n        eng = ENGINE_by_id(eng_str(OPENSSL_SSL_CLIENT_ENGINE_AUTO));\n        if (!eng) {\n            ERR_clear_error();\n            ENGINE_load_builtin_engines();\n            eng = ENGINE_by_id(eng_str(OPENSSL_SSL_CLIENT_ENGINE_AUTO));\n        }\n        if (!eng || !SSL_CTX_set_client_cert_engine(ret, eng))\n            ERR_clear_error();\n    }\n# endif\n#endif\n    ret->options |= SSL_OP_LEGACY_SERVER_CONNECT;\n    ret->options |= SSL_OP_NO_COMPRESSION;\n    ret->ext.status_type = TLSEXT_STATUSTYPE_nothing;\n    ret->max_early_data = SSL3_RT_MAX_PLAIN_LENGTH;\n    return ret;\n err:\n    SSLerr(SSL_F_SSL_CTX_NEW, ERR_R_MALLOC_FAILURE);\n err2:\n    SSL_CTX_free(ret);\n    return NULL;\n}', 'DEFINE_LHASH_OF(SSL_SESSION)', 'OPENSSL_LHASH *OPENSSL_LH_new(OPENSSL_LH_HASHFUNC h, OPENSSL_LH_COMPFUNC c)\n{\n    OPENSSL_LHASH *ret;\n    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)\n        goto err0;\n    if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)\n        goto err1;\n    ret->comp = ((c == NULL) ? (OPENSSL_LH_COMPFUNC)strcmp : c);\n    ret->hash = ((h == NULL) ? (OPENSSL_LH_HASHFUNC)OPENSSL_LH_strhash : h);\n    ret->num_nodes = MIN_NODES / 2;\n    ret->num_alloc_nodes = MIN_NODES;\n    ret->pmax = MIN_NODES / 2;\n    ret->up_load = UP_LOAD;\n    ret->down_load = DOWN_LOAD;\n    return (ret);\n err1:\n    OPENSSL_free(ret);\n err0:\n    return (NULL);\n}', 'void SSL_free(SSL *s)\n{\n    int i;\n    if (s == NULL)\n        return;\n    CRYPTO_DOWN_REF(&s->references, &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    ssl_free_wbio_buffer(s);\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->ext.hostname);\n    SSL_CTX_free(s->session_ctx);\n#ifndef OPENSSL_NO_EC\n    OPENSSL_free(s->ext.ecpointformats);\n    OPENSSL_free(s->ext.supportedgroups);\n#endif\n    sk_X509_EXTENSION_pop_free(s->ext.ocsp.exts, X509_EXTENSION_free);\n#ifndef OPENSSL_NO_OCSP\n    sk_OCSP_RESPID_pop_free(s->ext.ocsp.ids, OCSP_RESPID_free);\n#endif\n#ifndef OPENSSL_NO_CT\n    SCT_LIST_free(s->scts);\n    OPENSSL_free(s->ext.scts);\n#endif\n    OPENSSL_free(s->ext.ocsp.resp);\n    OPENSSL_free(s->ext.alpn);\n    OPENSSL_free(s->ext.tls13_cookie);\n    OPENSSL_free(s->clienthello);\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->ext.npn);\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_DOWN_REF(&a->references, &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->ext.ecpointformats);\n    OPENSSL_free(a->ext.supportedgroups);\n#endif\n    OPENSSL_free(a->ext.alpn);\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}']