summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authormatthew <matthew@openbsd.org>2014-07-18 21:40:54 +0000
committermatthew <matthew@openbsd.org>2014-07-18 21:40:54 +0000
commite54c0f45bd3dbf23ff668862702dcc414b63635f (patch)
tree8945fcd2be5d397501384c9de09de9dc9a914d6c /lib/libc
parentsync (diff)
downloadwireguard-openbsd-e54c0f45bd3dbf23ff668862702dcc414b63635f.tar.xz
wireguard-openbsd-e54c0f45bd3dbf23ff668862702dcc414b63635f.zip
Cleanup portable arc4random fork detection code:
1. Use "len" parameter instead of sizeof(*rs). 2. Simplify the atfork handler to be strictly async signal safe by simply writing to a global volatile sig_atomic_t object, and then checking for this in _rs_forkdetect(). (Idea from discussions with Szabolcs Nagy and Rich Felker.) 3. Use memset(rs, 0, sizeof(*rs)) to match OpenBSD's MAP_INHERIT_ZERO fork semantics to avoid any skew in behavior across platforms. ok deraadt
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions