From rng/gfsr4.c:
--8<----
/* Perform the "orthogonalization" of the matrix */
/* Based on the orthogonalization used in r250, as suggested initially
* by Kirkpatrick and Stoll, and pointed out to me by Brian Gough
*/
for (i=0; i<32; ++i) {
int k=7+i*3;
state->ra[k] &= mask; /* Turn off bits left of the diagonal */
state->ra[k] |= msb; /* Turn on the diagonal bit */
mask >>= 1;
msb >>= 1;
}
state->nd = i;
---->8--
As pointed out in rng/r250.c, k should be 7*i+3, not 7+i*3.
Additionally, the initialization of the array index with 32 might be
unintended.