-1406. [bug] dispatch initialises one of the LSFR's with a incorrect
+1407. [bug] lfsr incorrectly implements the shift register.
+ [RT #4617]
+
+1406. [bug] dispatch initialises one of the LFSR's with a incorrect
polynomial. [RT #4617]
1405. [func] Use arc4random() if available.
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lfsr.c,v 1.12 2001/11/27 00:56:12 gson Exp $ */
+/* $Id: lfsr.c,v 1.13 2002/12/05 04:01:54 marka Exp $ */
#include <config.h>
}
if (lfsr->state & 0x01) {
- lfsr->state = ((lfsr->state ^ lfsr->tap) >> 1) | highbit;
+ lfsr->state = (lfsr->state >> 1) ^ lfsr->tap;
return (1);
} else {
lfsr->state >>= 1;