Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: host/lib/host_common.c

Issue 3076033: Zero-out allocated buffer while creating kernel preamble header. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « firmware/version.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: host/lib/host_common.c
diff --git a/host/lib/host_common.c b/host/lib/host_common.c
index 3d0a23db2881e36bb1f292657ef7ea701ae15cf2..952a6290107369b280573563022e07375b62ccc5 100644
--- a/host/lib/host_common.c
+++ b/host/lib/host_common.c
@@ -94,6 +94,8 @@ VbKernelPreambleHeader* CreateKernelPreamble(
/* Allocate key block */
h = (VbKernelPreambleHeader*)Malloc(block_size);
+ Memset(h, 0, block_size);
+
if (!h)
return NULL;
body_sig_dest = (uint8_t*)(h + 1);
« no previous file with comments | « firmware/version.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698