diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | openbsd-compat/arc4random.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -17,6 +17,8 @@ | |||
17 | "doesn't bother me" deraadt@ | 17 | "doesn't bother me" deraadt@ |
18 | - (dtucker) [sshbuf.h] Only declare ECC functions if building without | 18 | - (dtucker) [sshbuf.h] Only declare ECC functions if building without |
19 | OpenSSL or if OpenSSL has ECC. | 19 | OpenSSL or if OpenSSL has ECC. |
20 | - (dtucker) [openbsd-compat/arc4random.c] Use explicit_bzero instead of an | ||
21 | assigment that might get optimized out. ok djm@ | ||
20 | 22 | ||
21 | 20140527 | 23 | 20140527 |
22 | - (djm) [cipher.c] Fix merge botch. | 24 | - (djm) [cipher.c] Fix merge botch. |
diff --git a/openbsd-compat/arc4random.c b/openbsd-compat/arc4random.c index eac073cc0..fa0d6301a 100644 --- a/openbsd-compat/arc4random.c +++ b/openbsd-compat/arc4random.c | |||
@@ -229,7 +229,7 @@ arc4random_buf(void *_buf, size_t n) | |||
229 | buf[i] = r & 0xff; | 229 | buf[i] = r & 0xff; |
230 | r >>= 8; | 230 | r >>= 8; |
231 | } | 231 | } |
232 | i = r = 0; | 232 | explicit_bzero(&r, sizeof(r)); |
233 | } | 233 | } |
234 | #endif /* !defined(HAVE_ARC4RANDOM_BUF) && defined(HAVE_ARC4RANDOM) */ | 234 | #endif /* !defined(HAVE_ARC4RANDOM_BUF) && defined(HAVE_ARC4RANDOM) */ |
235 | 235 | ||