[coreboot-gerrit] New patch to review for coreboot: bimgtool: initialize data header

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Fri Jun 12 11:06:05 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10524

-gerrit

commit 84000824aaaf9fd0a91b11c9de85709281946fa7
Author: Patrick Georgi <pgeorgi at chromium.org>
Date:   Fri Jun 12 11:04:49 2015 +0200

    bimgtool: initialize data header
    
    Otherwise dummy contains uninitialized data, which leads to non-reproducible
    builds (and a leak of 4 bytes of stack data).
    
    Change-Id: Iaaf846580ec436fdd4f0800c7576b544f50d6ae0
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
---
 util/bimgtool/bimgtool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/bimgtool/bimgtool.c b/util/bimgtool/bimgtool.c
index a970234..505bf7d 100644
--- a/util/bimgtool/bimgtool.c
+++ b/util/bimgtool/bimgtool.c
@@ -160,7 +160,7 @@ static const struct crc_t crc_type = {
 static int write_binary(FILE *out, FILE *in, struct bimg_header *hdr)
 {
 	static uint8_t file_buf[MAX_RECORD_BYTES];
-	struct bimg_data_header data_hdr;
+	struct bimg_data_header data_hdr = { 0 };
 	size_t n_written;
 
 	data_hdr.dest_addr = hdr->entry_addr;



More information about the coreboot-gerrit mailing list