diff options
Diffstat (limited to 'src/lib/libcrypto/crypto/getentropy_linux.c')
-rw-r--r-- | src/lib/libcrypto/crypto/getentropy_linux.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/crypto/getentropy_linux.c b/src/lib/libcrypto/crypto/getentropy_linux.c index 6947102136..eeaf9a4ef9 100644 --- a/src/lib/libcrypto/crypto/getentropy_linux.c +++ b/src/lib/libcrypto/crypto/getentropy_linux.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getentropy_linux.c,v 1.29 2014/07/21 19:15:56 deraadt Exp $ */ | 1 | /* $OpenBSD: getentropy_linux.c,v 1.30 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> |
@@ -539,7 +539,8 @@ getentropy_fallback(void *buf, size_t len) | |||
539 | memcpy((char *)buf + i, results, min(sizeof(results), len - i)); | 539 | memcpy((char *)buf + i, results, min(sizeof(results), len - i)); |
540 | i += min(sizeof(results), len - i); | 540 | i += min(sizeof(results), len - i); |
541 | } | 541 | } |
542 | memset(results, 0, sizeof results); | 542 | explicit_bzero(&ctx, sizeof ctx); |
543 | explicit_bzero(results, sizeof results); | ||
543 | if (gotdata(buf, len) == 0) { | 544 | if (gotdata(buf, len) == 0) { |
544 | errno = save_errno; | 545 | errno = save_errno; |
545 | return 0; /* satisfied */ | 546 | return 0; /* satisfied */ |