crypto/err/err.c:654: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `lh_delete`.
Showing all 4 steps of the trace


crypto/err/err.c:654:17: Call
652.   	tmp.pid=pid;
653.   	CRYPTO_w_lock(CRYPTO_LOCK_ERR);
654.   	p=(ERR_STATE *)lh_delete(thread_hash,&tmp);
                       ^
655.   	if (lh_num_items(thread_hash) == 0)
656.   		{

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

crypto/lhash/lhash.c:240:2: Binary operation: ([0, +oo] - 1):unsigned64 by call to `lh_delete` 
  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, void *data)
	{
	unsigned long hash;
	LHASH_NODE *nn,**rn;
	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;
		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(ret);
	}
['void ERR_remove_state(unsigned long pid)\n\t{\n\tERR_STATE *p,tmp;\n\tif (thread_hash == NULL)\n\t\treturn;\n\tif (pid == 0)\n\t\tpid=(unsigned long)CRYPTO_thread_id();\n\ttmp.pid=pid;\n\tCRYPTO_w_lock(CRYPTO_LOCK_ERR);\n\tp=(ERR_STATE *)lh_delete(thread_hash,&tmp);\n\tif (lh_num_items(thread_hash) == 0)\n\t\t{\n\t\tlh_free(thread_hash);\n\t\tthread_hash = NULL;\n\t\t}\n\tCRYPTO_w_unlock(CRYPTO_LOCK_ERR);\n\tif (p != NULL) ERR_STATE_free(p);\n\t}', 'void *lh_delete(LHASH *lh, void *data)\n\t{\n\tunsigned long hash;\n\tLHASH_NODE *nn,**rn;\n\tvoid *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(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}']