Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 May 2016 17:38:57 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 209616] [ndis][patch] compat/ndis rand() doesn't respect the seed
Message-ID:  <bug-209616-8-reF0lbpNrB@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-209616-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-209616-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209616

--- Comment #5 from commit-hook@freebsd.org ---
A commit references this bug:

Author: pfg
Date: Sat May 21 17:38:44 UTC 2016
New revision: 300376
URL: https://svnweb.freebsd.org/changeset/base/300376

Log:
  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
  here.

  PR:           209616
  MFC after:    2 weeks

Changes:
  head/sys/compat/ndis/subr_ntoskrnl.c

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-209616-8-reF0lbpNrB>