diff options
Diffstat (limited to 'src/lib/libcrypto/crypto/getentropy_osx.c')
| -rw-r--r-- | src/lib/libcrypto/crypto/getentropy_osx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/crypto/getentropy_osx.c b/src/lib/libcrypto/crypto/getentropy_osx.c index b0ffda8c09..ac5c748f6a 100644 --- a/src/lib/libcrypto/crypto/getentropy_osx.c +++ b/src/lib/libcrypto/crypto/getentropy_osx.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: getentropy_osx.c,v 1.7 2014/07/19 16:12:00 deraadt Exp $ */ | 1 | /* $OpenBSD: getentropy_osx.c,v 1.8 2014/07/21 20:19:47 guenther Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> | 4 | * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> |
| @@ -418,7 +418,8 @@ getentropy_fallback(void *buf, size_t len) | |||
| 418 | memcpy((char *)buf + i, results, min(sizeof(results), len - i)); | 418 | memcpy((char *)buf + i, results, min(sizeof(results), len - i)); |
| 419 | i += min(sizeof(results), len - i); | 419 | i += min(sizeof(results), len - i); |
| 420 | } | 420 | } |
| 421 | memset(results, 0, sizeof results); | 421 | explicit_bzero(&ctx, sizeof ctx); |
| 422 | explicit_bzero(results, sizeof results); | ||
| 422 | if (gotdata(buf, len) == 0) { | 423 | if (gotdata(buf, len) == 0) { |
| 423 | errno = save_errno; | 424 | errno = save_errno; |
| 424 | return 0; /* satisfied */ | 425 | return 0; /* satisfied */ |
