[Bug 209616] [ndis][patch] compat/ndis rand() doesn't respect the seed

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Jun 4 04:02:05 UTC 2016


--- Comment #6 from commit-hook at freebsd.org ---
A commit references this bug:

Author: pfg
Date: Sat Jun  4 04:01:28 UTC 2016
New revision: 301298
URL: https://svnweb.freebsd.org/changeset/base/301298

  MFC r300376:
  ndis(4): Better mimic the behavior of rand() on Windows.

  In ndis(4) we expose a rand() function that was constantly reseeding
  with a time depending function every time it was called. This
  essentially broke the reasoning behind seeding, and rendered srand()
  a no-op.

  Keep it simple, just use random() and srandom() as it's meant to work.
  It would have been tempting to just go for arc4random() but we
  want to mimic Microsoft, and we don't need crypto-grade randomness

  PR:           209616

_U  stable/10/

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list