ssl/ssl_lib.c:2101: error: INTEGER_OVERFLOW_L2
  ([0, 1+max(0, `s->initial_ctx->sessions->num_nodes`)] - 1):unsigned32 by call to `SSL_CTX_flush_sessions`.
Showing all 9 steps of the trace


ssl/ssl_lib.c:2074:1: Parameter `s->initial_ctx->sessions->num_nodes`
2072.   	}
2073.   
2074. > void ssl_update_cache(SSL *s,int mode)
2075.   	{
2076.   	int i;

ssl/ssl_lib.c:2101:4: Call
2099.   			:s->session_ctx->stats.sess_accept_good) & 0xff) == 0xff)
2100.   			{
2101.   			SSL_CTX_flush_sessions(s->session_ctx,(unsigned long)time(NULL));
           ^
2102.   			}
2103.   		}

ssl/ssl_sess.c:858:1: Parameter `s->sessions->num_nodes`
  856.   static IMPLEMENT_LHASH_DOALL_ARG_FN(timeout, SSL_SESSION, TIMEOUT_PARAM)
  857.   
  858. > void SSL_CTX_flush_sessions(SSL_CTX *s, long t)
  859.   	{
  860.   	unsigned long i;

ssl/ssl_sess.c:870:2: Call
  868.   	i=CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load;
  869.   	CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load=0;
  870.   	lh_SSL_SESSION_doall_arg(tp.cache, LHASH_DOALL_ARG_FN(timeout),
          ^
  871.   				 TIMEOUT_PARAM, &tp);
  872.   	CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load=i;

crypto/lhash/lhash.c:305:1: Parameter `lh->num_nodes`
    303.   	}
    304.   
    305. > void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg)
    306.   	{
    307.   	doall_util_fn(lh, 1, (LHASH_DOALL_FN_TYPE)0, func, arg);

crypto/lhash/lhash.c:307:2: Call
    305.   void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg)
    306.   	{
    307.   	doall_util_fn(lh, 1, (LHASH_DOALL_FN_TYPE)0, func, arg);
            ^
    308.   	}
    309.   

crypto/lhash/lhash.c:270:1: <LHS trace>
268.   	}
269.   
270. > static void doall_util_fn(_LHASH *lh, int use_arg, LHASH_DOALL_FN_TYPE func,
271.   			  LHASH_DOALL_ARG_FN_TYPE func_arg, void *arg)
272.   	{

crypto/lhash/lhash.c:270:1: Parameter `lh->num_nodes`
      268.   	}
      269.   
      270. > static void doall_util_fn(_LHASH *lh, int use_arg, LHASH_DOALL_FN_TYPE func,
      271.   			  LHASH_DOALL_ARG_FN_TYPE func_arg, void *arg)
      272.   	{

crypto/lhash/lhash.c:281:7: Binary operation: ([0, 1+max(0, s->initial_ctx->sessions->num_nodes)] - 1):unsigned32 by call to `SSL_CTX_flush_sessions` 
      279.   	/* reverse the order so we search from 'top to bottom'
      280.   	 * We were having memory leaks otherwise */
      281.   	for (i=lh->num_nodes-1; i>=0; i--)
                   ^
      282.   		{
      283.   		a=lh->b[i];

static void doall_util_fn(_LHASH *lh, int use_arg, LHASH_DOALL_FN_TYPE func,
			  LHASH_DOALL_ARG_FN_TYPE func_arg, void *arg)
	{
	int i;
	LHASH_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;
			}
		}
	}
['void ssl_update_cache(SSL *s,int mode)\n\t{\n\tint i;\n\tif (s->session->session_id_length == 0) return;\n\ti=s->session_ctx->session_cache_mode;\n\tif ((i & mode) && (!s->hit)\n\t\t&& ((i & SSL_SESS_CACHE_NO_INTERNAL_STORE)\n\t\t    || SSL_CTX_add_session(s->session_ctx,s->session))\n\t\t&& (s->session_ctx->new_session_cb != NULL))\n\t\t{\n\t\tCRYPTO_add(&s->session->references,1,CRYPTO_LOCK_SSL_SESSION);\n\t\tif (!s->session_ctx->new_session_cb(s,s->session))\n\t\t\tSSL_SESSION_free(s->session);\n\t\t}\n\tif ((!(i & SSL_SESS_CACHE_NO_AUTO_CLEAR)) &&\n\t\t((i & mode) == mode))\n\t\t{\n\t\tif (  (((mode & SSL_SESS_CACHE_CLIENT)\n\t\t\t?s->session_ctx->stats.sess_connect_good\n\t\t\t:s->session_ctx->stats.sess_accept_good) & 0xff) == 0xff)\n\t\t\t{\n\t\t\tSSL_CTX_flush_sessions(s->session_ctx,(unsigned long)time(NULL));\n\t\t\t}\n\t\t}\n\t}', 'void SSL_CTX_flush_sessions(SSL_CTX *s, long t)\n\t{\n\tunsigned long i;\n\tTIMEOUT_PARAM tp;\n\ttp.ctx=s;\n\ttp.cache=s->sessions;\n\tif (tp.cache == NULL) return;\n\ttp.time=t;\n\tCRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);\n\ti=CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load;\n\tCHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load=0;\n\tlh_SSL_SESSION_doall_arg(tp.cache, LHASH_DOALL_ARG_FN(timeout),\n\t\t\t\t TIMEOUT_PARAM, &tp);\n\tCHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load=i;\n\tCRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX);\n\t}', 'void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg)\n\t{\n\tdoall_util_fn(lh, 1, (LHASH_DOALL_FN_TYPE)0, func, arg);\n\t}', 'static void doall_util_fn(_LHASH *lh, int use_arg, LHASH_DOALL_FN_TYPE func,\n\t\t\t  LHASH_DOALL_ARG_FN_TYPE func_arg, void *arg)\n\t{\n\tint i;\n\tLHASH_NODE *a,*n;\n\tif (lh == NULL)\n\t\treturn;\n\tfor (i=lh->num_nodes-1; i>=0; i--)\n\t\t{\n\t\ta=lh->b[i];\n\t\twhile (a != NULL)\n\t\t\t{\n\t\t\tn=a->next;\n\t\t\tif(use_arg)\n\t\t\t\tfunc_arg(a->data,arg);\n\t\t\telse\n\t\t\t\tfunc(a->data);\n\t\t\ta=n;\n\t\t\t}\n\t\t}\n\t}']