Date: Sat, 04 Jun 2016 04:03:06 +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-ww8fmYbiSQ@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 #7 from commit-hook@freebsd.org --- A commit references this bug: Author: pfg Date: Sat Jun 4 04:02:03 UTC 2016 New revision: 301299 URL: https://svnweb.freebsd.org/changeset/base/301299 Log: 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 here. PR: 209616 Changes: _U stable/9/sys/ stable/9/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-ww8fmYbiSQ>