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


test/sslapitest.c:2819:10: Call
2817.       int testresult = 0;
2818.   
2819.       if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(),
                 ^
2820.                                          TLS1_VERSION, TLS_MAX_VERSION,
2821.                                          &sctx, &cctx, cert, privkey)))

test/ssltestlib.c:521:10: Call
  519.       SSL_CTX *clientctx = NULL;
  520.   
  521.       if (!TEST_ptr(serverctx = SSL_CTX_new(sm))
                  ^
  522.               || (cctx != NULL && !TEST_ptr(clientctx = SSL_CTX_new(cm))))
  523.           goto err;

ssl/ssl_lib.c:2995:21: Call
    2993.           goto err;
    2994.   
    2995.       ret->sessions = lh_SSL_SESSION_new(ssl_session_hash, ssl_session_cmp);
                                ^
    2996.       if (ret->sessions == NULL)
    2997.           goto err;

ssl/ssl_locl.h:732:1: Call
      730.   } TLSEXT_INDEX;
      731.   
      732. > DEFINE_LHASH_OF(SSL_SESSION);
      733.   /* Needed in ssl_cert.c */
      734.   DEFINE_LHASH_OF(X509_NAME);

crypto/lhash/lhash.c:54:5: Assignment
        52.       ret->comp = ((c == NULL) ? (OPENSSL_LH_COMPFUNC)strcmp : c);
        53.       ret->hash = ((h == NULL) ? (OPENSSL_LH_HASHFUNC)OPENSSL_LH_strhash : h);
        54.       ret->num_nodes = MIN_NODES / 2;
                  ^
        55.       ret->num_alloc_nodes = MIN_NODES;
        56.       ret->pmax = MIN_NODES / 2;

test/sslapitest.c:2840:5: Call
2838.   
2839.       /* Fatal error so abandon the connection from this client */
2840.       SSL_free(clientssl);
            ^
2841.       clientssl = NULL;
2842.   

ssl/ssl_lib.c:1124:1: Parameter `s->ctx->sessions->num_nodes`
  1122.   }
  1123.   
  1124. > void SSL_free(SSL *s)
  1125.   {
  1126.       int i;

ssl/ssl_lib.c:1197:5: Call
  1195.       RECORD_LAYER_release(&s->rlayer);
  1196.   
  1197.       SSL_CTX_free(s->ctx);
              ^
  1198.   
  1199.       ASYNC_WAIT_CTX_free(s->waitctx);

ssl/ssl_lib.c:3140:1: Parameter `a->sessions->num_nodes`
    3138.   }
    3139.   
    3140. > void SSL_CTX_free(SSL_CTX *a)
    3141.   {
    3142.       int i;

ssl/ssl_lib.c:3166:9: Call
    3164.        */
    3165.       if (a->sessions != NULL)
    3166.           SSL_CTX_flush_sessions(a, 0);
                    ^
    3167.   
    3168.       CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data);

ssl/ssl_sess.c:1117:1: Parameter `s->sessions->num_nodes`
      1115.   IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
      1116.   
      1117. > void SSL_CTX_flush_sessions(SSL_CTX *s, long t)
      1118.   {
      1119.       unsigned long i;

ssl/ssl_sess.c:1130:5: Call
      1128.       i = lh_SSL_SESSION_get_down_load(s->sessions);
      1129.       lh_SSL_SESSION_set_down_load(s->sessions, 0);
      1130.       lh_SSL_SESSION_doall_TIMEOUT_PARAM(tp.cache, timeout_cb, &tp);
                  ^
      1131.       lh_SSL_SESSION_set_down_load(s->sessions, i);
      1132.       CRYPTO_THREAD_unlock(s->lock);

ssl/ssl_sess.c:1115:1: Parameter `lh->num_nodes`
        1113.   }
        1114.   
        1115. > IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
        1116.   
        1117.   void SSL_CTX_flush_sessions(SSL_CTX *s, long t)

ssl/ssl_sess.c:1115:1: Call
        1113.   }
        1114.   
        1115. > IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
        1116.   
        1117.   void SSL_CTX_flush_sessions(SSL_CTX *s, long t)

crypto/lhash/lhash.c:198:1: Parameter `lh->num_nodes`
          196.   }
          197.   
          198. > void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNCARG func, void *arg)
          199.   {
          200.       doall_util_fn(lh, 1, (OPENSSL_LH_DOALL_FUNC)0, func, arg);

crypto/lhash/lhash.c:200:5: Call
          198.   void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNCARG func, void *arg)
          199.   {
          200.       doall_util_fn(lh, 1, (OPENSSL_LH_DOALL_FUNC)0, func, arg);
                     ^
          201.   }
          202.   

crypto/lhash/lhash.c:166:1: <LHS trace>
164.   }
165.   
166. > static void doall_util_fn(OPENSSL_LHASH *lh, int use_arg,
167.                             OPENSSL_LH_DOALL_FUNC func,
168.                             OPENSSL_LH_DOALL_FUNCARG func_arg, void *arg)

crypto/lhash/lhash.c:166:1: Parameter `lh->num_nodes`
            164.   }
            165.   
            166. > static void doall_util_fn(OPENSSL_LHASH *lh, int use_arg,
            167.                             OPENSSL_LH_DOALL_FUNC func,
            168.                             OPENSSL_LH_DOALL_FUNCARG func_arg, void *arg)

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