crypto/mem.c:357: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned32 by call to `lh_doall_arg`.
Showing all 4 steps of the trace


crypto/mem.c:357:2: Call
355.   	CRYPTO_w_lock(CRYPTO_LOCK_MALLOC);
356.   	mem_cb=cb;
357.   	lh_doall_arg(mh,(void (*)())cb_leak,(char *)mem_cb);
        ^
358.   	mem_cb=NULL;
359.   	CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC);

crypto/lhash/lhash.c:289:1: <LHS trace>
287.   	}
288.   
289. > void lh_doall_arg(LHASH *lh, void (*func)(), char *arg)
290.   	{
291.   	int i;

crypto/lhash/lhash.c:289:1: Parameter `lh->num_nodes`
  287.   	}
  288.   
  289. > void lh_doall_arg(LHASH *lh, void (*func)(), char *arg)
  290.   	{
  291.   	int i;

crypto/lhash/lhash.c:296:7: Binary operation: ([0, +oo] - 1):unsigned32 by call to `lh_doall_arg` 
  294.   	/* reverse the order so we search from 'top to bottom'
  295.   	 * We were having memory leaks otherwise */
  296.   	for (i=lh->num_nodes-1; i>=0; i--)
               ^
  297.   		{
  298.   		a=lh->b[i];

void lh_doall_arg(LHASH *lh, void (*func)(), char *arg)
	{
	int i;
	LHASH_NODE *a,*n;
	for (i=lh->num_nodes-1; i>=0; i--)
		{
		a=lh->b[i];
		while (a != NULL)
			{
			n=a->next;
			func(a->data,arg);
			a=n;
			}
		}
	}
['void CRYPTO_mem_leaks_cb(void (*cb)())\n\t{\n\tif (mh == NULL) return;\n\tCRYPTO_w_lock(CRYPTO_LOCK_MALLOC);\n\tmem_cb=cb;\n\tlh_doall_arg(mh,(void (*)())cb_leak,(char *)mem_cb);\n\tmem_cb=NULL;\n\tCRYPTO_w_unlock(CRYPTO_LOCK_MALLOC);\n\t}', 'void lh_doall_arg(LHASH *lh, void (*func)(), char *arg)\n\t{\n\tint i;\n\tLHASH_NODE *a,*n;\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\tfunc(a->data,arg);\n\t\t\ta=n;\n\t\t\t}\n\t\t}\n\t}']