mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-09-08 02:22:16 +00:00
22 lines
747 B
Diff
22 lines
747 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Micay <danielmicay@gmail.com>
|
|
Date: Fri, 6 Feb 2015 11:41:57 -0500
|
|
Subject: [PATCH] zero sensitive information with explicit_bzero
|
|
|
|
---
|
|
init/security.cpp | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/init/security.cpp b/init/security.cpp
|
|
index a3494a280..4b6c918ab 100644
|
|
--- a/init/security.cpp
|
|
+++ b/init/security.cpp
|
|
@@ -73,6 +73,7 @@ Result<Success> MixHwrngIntoLinuxRngAction(const BuiltinArguments&) {
|
|
}
|
|
|
|
chunk_size = TEMP_FAILURE_RETRY(write(urandom_fd, buf, chunk_size));
|
|
+ explicit_bzero(buf, chunk_size);
|
|
if (chunk_size == -1) {
|
|
return ErrnoError() << "Failed to write to /dev/urandom";
|
|
}
|