In the hashgrid the hg->bins is an array of pointers to hg->items.
But due to a faulty initialization, the pointers in the highest bins
after the final item point (one) outside the range of the hg->items array.
If these bins are referenced a segfault can occur.
This change forces the bins pointers to stay within hg->items array.
In the hashgrid the hg->bins is an array of pointers to hg->items. But due to a faulty initialization, the pointers in the highest bins after the final item point (one) outside the range of the hg->items array. If these bins are referenced a segfault can occur.
This change forces the bins pointers to stay within hg->items array.