Browse Source

re-init and init code paths are now more shared, so the getpid()-based

portable code path must handle that; with brent cook
OPENBSD_5_6
deraadt 10 years ago
parent
commit
b3e0f519ff
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/lib/libc/crypt/arc4random.c

+ 3
- 2
src/lib/libc/crypt/arc4random.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: arc4random.c,v 1.38 2014/06/26 19:23:15 deraadt Exp $ */
/* $OpenBSD: arc4random.c,v 1.39 2014/06/27 21:31:12 deraadt Exp $ */
/*
* Copyright (c) 1996, David Mazieres <dm@uun.org>
@ -120,7 +120,8 @@ _rs_stir_if_needed(size_t len)
/* If a system lacks MAP_INHERIT_ZERO, resort to getpid() */
if (_rs_pid == 0 || _rs_pid != pid) {
_rs_pid = pid;
rs->rs_count = 0;
if (rs)
rs->rs_count = 0;
}
#endif
if (!rs || rs->rs_count <= len)


Loading…
Cancel
Save