apps/s_time.c:646: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `SSL_new`.
Showing all 14 steps of the trace


apps/s_time.c:646:20: Call
644.   
645.   	if (scon == NULL)
646.   		serverCon=(SSL *)SSL_new(tm_ctx);
                          ^
647.   	else
648.   		{

ssl/ssl_lib.c:162:1: Parameter `ctx->sessions->num_items`
  160.   	}
  161.   
  162. > SSL *SSL_new(SSL_CTX *ctx)
  163.   	{
  164.   	SSL *s;

ssl/ssl_lib.c:212:2: Call
  210.   	s->server=(ctx->method->ssl_accept == ssl_undefined_function)?0:1;
  211.   	s->options=ctx->options;
  212.   	SSL_clear(s);
          ^
  213.   
  214.   	CRYPTO_new_ex_data(ssl_meth,(char *)s,&s->ex_data);

ssl/ssl_lib.c:82:1: Parameter `s->ctx->sessions->num_items`
    80.   	};
    81.   
    82. > int SSL_clear(SSL *s)
    83.   	{
    84.   	int state;

ssl/ssl_lib.c:121:6: Call
    119.   	ssl_clear_cipher_ctx(s);
    120.   
    121.   	if (ssl_clear_bad_session(s))
                ^
    122.   		{
    123.   		SSL_SESSION_free(s->session);

ssl/ssl_sess.c:520:1: Parameter `s->ctx->sessions->num_items`
      518.   	}
      519.   
      520. > int ssl_clear_bad_session(SSL *s)
      521.   	{
      522.   	if (	(s->session != NULL) &&

ssl/ssl_sess.c:526:3: Call
      524.   		!(SSL_in_init(s) || SSL_in_before(s)))
      525.   		{
      526.   		SSL_CTX_remove_session(s->ctx,s->session);
               ^
      527.   		return(1);
      528.   		}

ssl/ssl_sess.c:320:1: Parameter `ctx->sessions->num_items`
        318.   	}
        319.   
        320. > int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
        321.   {
        322.   	return remove_session_lock(ctx, c, 1);

ssl/ssl_sess.c:322:9: Call
        320.   int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
        321.   {
        322.   	return remove_session_lock(ctx, c, 1);
                       ^
        323.   }
        324.   

ssl/ssl_sess.c:325:1: Parameter `ctx->sessions->num_items`
          323.   }
          324.   
          325. > static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck)
          326.   	{
          327.   	SSL_SESSION *r;

ssl/ssl_sess.c:333:20: Call
          331.   		{
          332.   		if(lck) CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);
          333.   		r=(SSL_SESSION *)lh_delete(ctx->sessions,(char *)c);
                                    ^
          334.   		if (r != NULL)
          335.   			{

crypto/lhash/lhash.c:220:1: <LHS trace>
218.   	}
219.   
220. > char *lh_delete(LHASH *lh, char *data)
221.   	{
222.   	unsigned long hash;

crypto/lhash/lhash.c:220:1: Parameter `lh->num_items`
            218.   	}
            219.   
            220. > char *lh_delete(LHASH *lh, char *data)
            221.   	{
            222.   	unsigned long hash;

crypto/lhash/lhash.c:243:2: Binary operation: ([0, +oo] - 1):unsigned64 by call to `SSL_new` 
            241.   		}
            242.   
            243.   	lh->num_items--;
                    ^
            244.   	if ((lh->num_nodes > MIN_NODES) &&
            245.   		(lh->down_load >= (lh->num_items*LH_LOAD_MULT/lh->num_nodes)))

char *lh_delete(LHASH *lh, char *data)
	{
	unsigned long hash;
	LHASH_NODE *nn,**rn;
	char *ret;
	lh->error=0;
	rn=getrn(lh,data,&hash);
	if (*rn == NULL)
		{
		lh->num_no_delete++;
		return(NULL);
		}
	else
		{
		nn= *rn;
		*rn=nn->next;
		ret=nn->data;
		Free((char *)nn);
		lh->num_delete++;
		}
	lh->num_items--;
	if ((lh->num_nodes > MIN_NODES) &&
		(lh->down_load >= (lh->num_items*LH_LOAD_MULT/lh->num_nodes)))
		contract(lh);
	return(ret);
	}
['static SSL *doConnection(SSL *scon)\n\t{\n\tBIO *conn;\n\tSSL *serverCon;\n\tint width, i;\n\tfd_set readfds;\n\tif ((conn=BIO_new(BIO_s_connect())) == NULL)\n\t\treturn(NULL);\n\tBIO_set_conn_hostname(conn,host);\n\tif (scon == NULL)\n\t\tserverCon=(SSL *)SSL_new(tm_ctx);\n\telse\n\t\t{\n\t\tserverCon=scon;\n\t\tSSL_set_connect_state(serverCon);\n\t\t}\n\tSSL_set_bio(serverCon,conn,conn);\n#if 0\n\tif( scon != NULL )\n\t\tSSL_set_session(serverCon,SSL_get_session(scon));\n#endif\n\tfor(;;) {\n\t\ti=SSL_connect(serverCon);\n\t\tif (BIO_sock_should_retry(i))\n\t\t\t{\n\t\t\tBIO_printf(bio_err,"DELAY\\n");\n\t\t\ti=SSL_get_fd(serverCon);\n\t\t\twidth=i+1;\n\t\t\tFD_ZERO(&readfds);\n\t\t\tFD_SET(i,&readfds);\n\t\t\tselect(width,&readfds,NULL,NULL,NULL);\n\t\t\tcontinue;\n\t\t\t}\n\t\tbreak;\n\t\t}\n\tif(i <= 0)\n\t\t{\n\t\tBIO_printf(bio_err,"ERROR\\n");\n\t\tif (verify_error != X509_V_OK)\n\t\t\tBIO_printf(bio_err,"verify error:%s\\n",\n\t\t\t\tX509_verify_cert_error_string(verify_error));\n\t\telse\n\t\t\tERR_print_errors(bio_err);\n\t\tif (scon == NULL)\n\t\t\tSSL_free(serverCon);\n\t\treturn NULL;\n\t\t}\n\treturn serverCon;\n\t}', 'SSL *SSL_new(SSL_CTX *ctx)\n\t{\n\tSSL *s;\n\tif (ctx == NULL)\n\t\t{\n\t\tSSLerr(SSL_F_SSL_NEW,SSL_R_NULL_SSL_CTX);\n\t\treturn(NULL);\n\t\t}\n\tif (ctx->method == NULL)\n\t\t{\n\t\tSSLerr(SSL_F_SSL_NEW,SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION);\n\t\treturn(NULL);\n\t\t}\n\ts=(SSL *)Malloc(sizeof(SSL));\n\tif (s == NULL) goto err;\n\tmemset(s,0,sizeof(SSL));\n\tif (ctx->default_cert != NULL)\n\t\t{\n\t\tCRYPTO_add(&ctx->default_cert->references,1,\n\t\t\t   CRYPTO_LOCK_SSL_CERT);\n\t\ts->cert=ctx->default_cert;\n\t\t}\n\telse\n\t\ts->cert=NULL;\n\ts->sid_ctx_length=ctx->sid_ctx_length;\n\tmemcpy(&s->sid_ctx,&ctx->sid_ctx,sizeof(s->sid_ctx));\n\ts->verify_mode=ctx->verify_mode;\n\ts->verify_depth=ctx->verify_depth;\n\ts->verify_callback=ctx->default_verify_callback;\n\tCRYPTO_add(&ctx->references,1,CRYPTO_LOCK_SSL_CTX);\n\ts->ctx=ctx;\n\ts->verify_result=X509_V_OK;\n\ts->method=ctx->method;\n\tif (!s->method->ssl_new(s))\n\t\t{\n\t\tSSL_CTX_free(ctx);\n\t\tFree(s);\n\t\tgoto err;\n\t\t}\n\ts->quiet_shutdown=ctx->quiet_shutdown;\n\ts->references=1;\n\ts->server=(ctx->method->ssl_accept == ssl_undefined_function)?0:1;\n\ts->options=ctx->options;\n\tSSL_clear(s);\n\tCRYPTO_new_ex_data(ssl_meth,(char *)s,&s->ex_data);\n\treturn(s);\nerr:\n\tSSLerr(SSL_F_SSL_NEW,ERR_R_MALLOC_FAILURE);\n\treturn(NULL);\n\t}', 'int SSL_clear(SSL *s)\n\t{\n\tint state;\n\tif (s->method == NULL)\n\t\t{\n\t\tSSLerr(SSL_F_SSL_CLEAR,SSL_R_NO_METHOD_SPECIFIED);\n\t\treturn(0);\n\t\t}\n\ts->error=0;\n\ts->hit=0;\n\ts->shutdown=0;\n#if 0\n\tif (s->new_session) return(1);\n#endif\n\tstate=s->state;\n\ts->type=0;\n\ts->state=SSL_ST_BEFORE|((s->server)?SSL_ST_ACCEPT:SSL_ST_CONNECT);\n\ts->version=s->method->version;\n\ts->client_version=s->version;\n\ts->rwstate=SSL_NOTHING;\n\ts->rstate=SSL_ST_READ_HEADER;\n\ts->read_ahead=s->ctx->read_ahead;\n\tif (s->init_buf != NULL)\n\t\t{\n\t\tBUF_MEM_free(s->init_buf);\n\t\ts->init_buf=NULL;\n\t\t}\n\tssl_clear_cipher_ctx(s);\n\tif (ssl_clear_bad_session(s))\n\t\t{\n\t\tSSL_SESSION_free(s->session);\n\t\ts->session=NULL;\n\t\t}\n\ts->first_packet=0;\n#if 1\n\tif ((s->session == NULL) && (s->method != s->ctx->method))\n\t\t{\n\t\ts->method->ssl_free(s);\n\t\ts->method=s->ctx->method;\n\t\tif (!s->method->ssl_new(s))\n\t\t\treturn(0);\n\t\t}\n\telse\n#endif\n\t\ts->method->ssl_clear(s);\n\treturn(1);\n\t}', 'int ssl_clear_bad_session(SSL *s)\n\t{\n\tif (\t(s->session != NULL) &&\n\t\t!(s->shutdown & SSL_SENT_SHUTDOWN) &&\n\t\t!(SSL_in_init(s) || SSL_in_before(s)))\n\t\t{\n\t\tSSL_CTX_remove_session(s->ctx,s->session);\n\t\treturn(1);\n\t\t}\n\telse\n\t\treturn(0);\n\t}', 'int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)\n{\n\treturn remove_session_lock(ctx, c, 1);\n}', 'static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck)\n\t{\n\tSSL_SESSION *r;\n\tint ret=0;\n\tif ((c != NULL) && (c->session_id_length != 0))\n\t\t{\n\t\tif(lck) CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);\n\t\tr=(SSL_SESSION *)lh_delete(ctx->sessions,(char *)c);\n\t\tif (r != NULL)\n\t\t\t{\n\t\t\tret=1;\n\t\t\tSSL_SESSION_list_remove(ctx,c);\n\t\t\t}\n\t\tif(lck) CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX);\n\t\tif (ret)\n\t\t\t{\n\t\t\tr->not_resumable=1;\n\t\t\tif (ctx->remove_session_cb != NULL)\n\t\t\t\tctx->remove_session_cb(ctx,r);\n\t\t\tSSL_SESSION_free(r);\n\t\t\t}\n\t\t}\n\telse\n\t\tret=0;\n\treturn(ret);\n\t}', 'char *lh_delete(LHASH *lh, char *data)\n\t{\n\tunsigned long hash;\n\tLHASH_NODE *nn,**rn;\n\tchar *ret;\n\tlh->error=0;\n\trn=getrn(lh,data,&hash);\n\tif (*rn == NULL)\n\t\t{\n\t\tlh->num_no_delete++;\n\t\treturn(NULL);\n\t\t}\n\telse\n\t\t{\n\t\tnn= *rn;\n\t\t*rn=nn->next;\n\t\tret=nn->data;\n\t\tFree((char *)nn);\n\t\tlh->num_delete++;\n\t\t}\n\tlh->num_items--;\n\tif ((lh->num_nodes > MIN_NODES) &&\n\t\t(lh->down_load >= (lh->num_items*LH_LOAD_MULT/lh->num_nodes)))\n\t\tcontract(lh);\n\treturn(ret);\n\t}']