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


crypto/err/err.c:423:6: Call
421.   
422.   	CRYPTO_w_lock(CRYPTO_LOCK_ERR);
423.   	p = lh_ERR_STRING_DATA_delete(hash, d);
            ^
424.   	CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
425.   

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

crypto/lhash/lhash.c:243:3: Call
  241.   	if ((lh->num_nodes > MIN_NODES) &&
  242.   		(lh->down_load >= (lh->num_items*LH_LOAD_MULT/lh->num_nodes)))
  243.   		contract(lh);
           ^
  244.   
  245.   	return(ret);

crypto/lhash/lhash.c:366:1: <LHS trace>
364.   	}
365.   
366. > static void contract(_LHASH *lh)
367.   	{
368.   	LHASH_NODE **n,*n1,*np;

crypto/lhash/lhash.c:366:1: Parameter `lh->p`
    364.   	}
    365.   
    366. > static void contract(_LHASH *lh)
    367.   	{
    368.   	LHASH_NODE **n,*n1,*np;

crypto/lhash/lhash.c:370:5: Binary operation: ([0, +oo] - 1):unsigned32 by call to `lh_delete` 
    368.   	LHASH_NODE **n,*n1,*np;
    369.   
    370.   	np=lh->b[lh->p+lh->pmax-1];
               ^
    371.   	lh->b[lh->p+lh->pmax-1]=NULL; /* 24/07-92 - eay - weird but :-( */
    372.   	if (lh->p == 0)

static void contract(_LHASH *lh)
	{
	LHASH_NODE **n,*n1,*np;
	np=lh->b[lh->p+lh->pmax-1];
	lh->b[lh->p+lh->pmax-1]=NULL;
	if (lh->p == 0)
		{
		n=(LHASH_NODE **)OPENSSL_realloc(lh->b,
			(unsigned int)(sizeof(LHASH_NODE *)*lh->pmax));
		if (n == NULL)
			{
			lh->error++;
			return;
			}
		lh->num_contract_reallocs++;
		lh->num_alloc_nodes/=2;
		lh->pmax/=2;
		lh->p=lh->pmax-1;
		lh->b=n;
		}
	else
		lh->p--;
	lh->num_nodes--;
	lh->num_contracts++;
	n1=lh->b[(int)lh->p];
	if (n1 == NULL)
		lh->b[(int)lh->p]=np;
	else
		{
		while (n1->next != NULL)
			n1=n1->next;
		n1->next=np;
		}
	}
['static ERR_STRING_DATA *int_err_del_item(ERR_STRING_DATA *d)\n\t{\n\tERR_STRING_DATA *p;\n\tLHASH_OF(ERR_STRING_DATA) *hash;\n\terr_fns_check();\n\thash = ERRFN(err_get)(0);\n\tif (!hash)\n\t\treturn NULL;\n\tCRYPTO_w_lock(CRYPTO_LOCK_ERR);\n\tp = lh_ERR_STRING_DATA_delete(hash, d);\n\tCRYPTO_w_unlock(CRYPTO_LOCK_ERR);\n\treturn p;\n\t}', 'void *lh_delete(_LHASH *lh, const 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\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(ret);\n\t}', 'static void contract(_LHASH *lh)\n\t{\n\tLHASH_NODE **n,*n1,*np;\n\tnp=lh->b[lh->p+lh->pmax-1];\n\tlh->b[lh->p+lh->pmax-1]=NULL;\n\tif (lh->p == 0)\n\t\t{\n\t\tn=(LHASH_NODE **)OPENSSL_realloc(lh->b,\n\t\t\t(unsigned int)(sizeof(LHASH_NODE *)*lh->pmax));\n\t\tif (n == NULL)\n\t\t\t{\n\t\t\tlh->error++;\n\t\t\treturn;\n\t\t\t}\n\t\tlh->num_contract_reallocs++;\n\t\tlh->num_alloc_nodes/=2;\n\t\tlh->pmax/=2;\n\t\tlh->p=lh->pmax-1;\n\t\tlh->b=n;\n\t\t}\n\telse\n\t\tlh->p--;\n\tlh->num_nodes--;\n\tlh->num_contracts++;\n\tn1=lh->b[(int)lh->p];\n\tif (n1 == NULL)\n\t\tlh->b[(int)lh->p]=np;\n\telse\n\t\t{\n\t\twhile (n1->next != NULL)\n\t\t\tn1=n1->next;\n\t\tn1->next=np;\n\t\t}\n\t}']