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


test/sslapitest.c:802:10: Call
800.       new_called = remove_called = 0;
801.   
802.       if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(),
                ^
803.                                          TLS_client_method(), &sctx,
804.                                          &cctx, cert, privkey)))

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

ssl/ssl_lib.c:2778:21: Call
    2776.           goto err;
    2777.   
    2778.       ret->sessions = lh_SSL_SESSION_new(ssl_session_hash, ssl_session_cmp);
                                ^
    2779.       if (ret->sessions == NULL)
    2780.           goto err;

ssl/ssl_locl.h:702:1: Call
      700.   } TLSEXT_INDEX;
      701.   
      702. > DEFINE_LHASH_OF(SSL_SESSION);
      703.   /* Needed in ssl_cert.c */
      704.   DEFINE_LHASH_OF(X509_NAME);

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

test/sslapitest.c:960:5: Call
958.   
959.       SSL_free(serverssl1);
960.       SSL_free(clientssl1);
           ^
961.       serverssl1 = clientssl1 = NULL;
962.       SSL_free(serverssl2);

ssl/ssl_lib.c:1063:1: Parameter `s->ctx->sessions->num_nodes`
  1061.   }
  1062.   
  1063. > void SSL_free(SSL *s)
  1064.   {
  1065.       int i;

ssl/ssl_lib.c:1132:5: Call
  1130.       RECORD_LAYER_release(&s->rlayer);
  1131.   
  1132.       SSL_CTX_free(s->ctx);
              ^
  1133.   
  1134.       ASYNC_WAIT_CTX_free(s->waitctx);

ssl/ssl_lib.c:2895:1: Parameter `a->sessions->num_nodes`
    2893.   }
    2894.   
    2895. > void SSL_CTX_free(SSL_CTX *a)
    2896.   {
    2897.       int i;

ssl/ssl_lib.c:2921:9: Call
    2919.        */
    2920.       if (a->sessions != NULL)
    2921.           SSL_CTX_flush_sessions(a, 0);
                    ^
    2922.   
    2923.       CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data);

ssl/ssl_sess.c:1049:1: Parameter `s->sessions->num_nodes`
      1047.   IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
      1048.   
      1049. > void SSL_CTX_flush_sessions(SSL_CTX *s, long t)
      1050.   {
      1051.       unsigned long i;

ssl/ssl_sess.c:1062:5: Call
      1060.       i = lh_SSL_SESSION_get_down_load(s->sessions);
      1061.       lh_SSL_SESSION_set_down_load(s->sessions, 0);
      1062.       lh_SSL_SESSION_doall_TIMEOUT_PARAM(tp.cache, timeout_cb, &tp);
                  ^
      1063.       lh_SSL_SESSION_set_down_load(s->sessions, i);
      1064.       CRYPTO_THREAD_unlock(s->lock);

ssl/ssl_sess.c:1047:1: Parameter `lh->num_nodes`
        1045.   }
        1046.   
        1047. > IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
        1048.   
        1049.   void SSL_CTX_flush_sessions(SSL_CTX *s, long t)

ssl/ssl_sess.c:1047:1: Call
        1045.   }
        1046.   
        1047. > IMPLEMENT_LHASH_DOALL_ARG(SSL_SESSION, TIMEOUT_PARAM);
        1048.   
        1049.   void SSL_CTX_flush_sessions(SSL_CTX *s, long t)

crypto/lhash/lhash.c:186:1: Parameter `lh->num_nodes`
          184.   }
          185.   
          186. > void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNCARG func, void *arg)
          187.   {
          188.       doall_util_fn(lh, 1, (OPENSSL_LH_DOALL_FUNC)0, func, arg);

crypto/lhash/lhash.c:188:5: Call
          186.   void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNCARG func, void *arg)
          187.   {
          188.       doall_util_fn(lh, 1, (OPENSSL_LH_DOALL_FUNC)0, func, arg);
                     ^
          189.   }
          190.   

crypto/lhash/lhash.c:154:1: <LHS trace>
152.   }
153.   
154. > static void doall_util_fn(OPENSSL_LHASH *lh, int use_arg,
155.                             OPENSSL_LH_DOALL_FUNC func,
156.                             OPENSSL_LH_DOALL_FUNCARG func_arg, void *arg)

crypto/lhash/lhash.c:154:1: Parameter `lh->num_nodes`
            152.   }
            153.   
            154. > static void doall_util_fn(OPENSSL_LHASH *lh, int use_arg,
            155.                             OPENSSL_LH_DOALL_FUNC func,
            156.                             OPENSSL_LH_DOALL_FUNCARG func_arg, void *arg)

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