diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2014-07-18 21:40:55 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2014-07-18 21:40:55 +0000 |
commit | c80b1e1bd26a00b37c28de3a88ffe420aaf1fa77 (patch) | |
tree | 79101e37f8210e587ee31d7ab381c233bf1b1b01 /lib/libcrypto/whrlpool/wp_block.c | |
parent | 7e628a7893957d87bb7c974fa301630a8e0aef8d (diff) |
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/libcrypto/whrlpool/wp_block.c')
0 files changed, 0 insertions, 0 deletions