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


apps/s_time.c:652:1: Parameter `scon->ctx->sessions->num_items`
650.    *		SSL *	= the connection pointer.
651.    */
652. > static SSL *doConnection(SSL *scon)
653.   	{
654.   	BIO *conn;

apps/s_time.c:711:4: Call
709.   			ERR_print_errors(bio_err);
710.   		if (scon == NULL)
711.   			SSL_free(serverCon);
          ^
712.   		return NULL;
713.   		}

ssl/ssl_lib.c:410:1: Parameter `s->ctx->sessions->num_items`
  408.   	}
  409.   
  410. > void SSL_free(SSL *s)
  411.   	{
  412.   	int i;

ssl/ssl_lib.c:456:3: Call
  454.   	if (s->session != NULL)
  455.   		{
  456.   		ssl_clear_bad_session(s);
           ^
  457.   		SSL_SESSION_free(s->session);
  458.   		}

ssl/ssl_sess.c:678:1: Parameter `s->ctx->sessions->num_items`
    676.   	}
    677.   
    678. > int ssl_clear_bad_session(SSL *s)
    679.   	{
    680.   	if (	(s->session != NULL) &&

ssl/ssl_sess.c:684:3: Call
    682.   		!(SSL_in_init(s) || SSL_in_before(s)))
    683.   		{
    684.   		SSL_CTX_remove_session(s->ctx,s->session);
             ^
    685.   		return(1);
    686.   		}

ssl/ssl_sess.c:464:1: Parameter `ctx->sessions->num_items`
      462.   	}
      463.   
      464. > int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
      465.   {
      466.   	return remove_session_lock(ctx, c, 1);

ssl/ssl_sess.c:466:9: Call
      464.   int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
      465.   {
      466.   	return remove_session_lock(ctx, c, 1);
                     ^
      467.   }
      468.   

ssl/ssl_sess.c:469:1: Parameter `ctx->sessions->num_items`
        467.   }
        468.   
        469. > static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck)
        470.   	{
        471.   	SSL_SESSION *r;

ssl/ssl_sess.c:480:21: Call
        478.   			{
        479.   			ret=1;
        480.   			r=(SSL_SESSION *)lh_delete(ctx->sessions,c);
                                   ^
        481.   			SSL_SESSION_list_remove(ctx,c);
        482.   			}

crypto/lhash/lhash.c:217:1: <LHS trace>
215.   	}
216.   
217. > void *lh_delete(LHASH *lh, const void *data)
218.   	{
219.   	unsigned long hash;

crypto/lhash/lhash.c:217:1: Parameter `lh->num_items`
          215.   	}
          216.   
          217. > void *lh_delete(LHASH *lh, const void *data)
          218.   	{
          219.   	unsigned long hash;

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

void *lh_delete(LHASH *lh, const void *data)
	{
	unsigned long hash;
	LHASH_NODE *nn,**rn;
	const void *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;
		OPENSSL_free(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((void *)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_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,(void *)&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}', 'void SSL_free(SSL *s)\n\t{\n\tint i;\n\tif(s == NULL)\n\t    return;\n\ti=CRYPTO_add(&s->references,-1,CRYPTO_LOCK_SSL);\n#ifdef REF_PRINT\n\tREF_PRINT("SSL",s);\n#endif\n\tif (i > 0) return;\n#ifdef REF_CHECK\n\tif (i < 0)\n\t\t{\n\t\tfprintf(stderr,"SSL_free, bad reference count\\n");\n\t\tabort();\n\t\t}\n#endif\n\tCRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL, s, &s->ex_data);\n\tif (s->bbio != NULL)\n\t\t{\n\t\tif (s->bbio == s->wbio)\n\t\t\t{\n\t\t\ts->wbio=BIO_pop(s->wbio);\n\t\t\t}\n\t\tBIO_free(s->bbio);\n\t\ts->bbio=NULL;\n\t\t}\n\tif (s->rbio != NULL)\n\t\tBIO_free_all(s->rbio);\n\tif ((s->wbio != NULL) && (s->wbio != s->rbio))\n\t\tBIO_free_all(s->wbio);\n\tif (s->init_buf != NULL) BUF_MEM_free(s->init_buf);\n\tif (s->cipher_list != NULL) sk_SSL_CIPHER_free(s->cipher_list);\n\tif (s->cipher_list_by_id != NULL) sk_SSL_CIPHER_free(s->cipher_list_by_id);\n\tif (s->session != NULL)\n\t\t{\n\t\tssl_clear_bad_session(s);\n\t\tSSL_SESSION_free(s->session);\n\t\t}\n\tssl_clear_cipher_ctx(s);\n\tif (s->cert != NULL) ssl_cert_free(s->cert);\n\tif (s->ctx) SSL_CTX_free(s->ctx);\n\tif (s->client_CA != NULL)\n\t\tsk_X509_NAME_pop_free(s->client_CA,X509_NAME_free);\n\tif (s->method != NULL) s->method->ssl_free(s);\n\tOPENSSL_free(s);\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\tif ((r = (SSL_SESSION *)lh_retrieve(ctx->sessions,c)) == c)\n\t\t\t{\n\t\t\tret=1;\n\t\t\tr=(SSL_SESSION *)lh_delete(ctx->sessions,c);\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}', 'void *lh_delete(LHASH *lh, const void *data)\n\t{\n\tunsigned long hash;\n\tLHASH_NODE *nn,**rn;\n\tconst void *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\tOPENSSL_free(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((void *)ret);\n\t}']