Blame SOURCES/0026-makeguids-initialize-memory.patch

5e6fc3
From 50d7b979d1aa1c4afbb60a702bd16f9ff3066c50 Mon Sep 17 00:00:00 2001
5e6fc3
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
5e6fc3
Date: Tue, 24 Jul 2018 09:34:21 +0200
5e6fc3
Subject: [PATCH 26/39] makeguids: initialize memory
5e6fc3
5e6fc3
so that we do not write uninitialized memory into guids.bin and names.bin
5e6fc3
which made the resulting libefivar.so.1.36 unreproducible.
5e6fc3
See https://reproducible-builds.org/ for why this matters.
5e6fc3
---
5e6fc3
 src/makeguids.c | 1 +
5e6fc3
 1 file changed, 1 insertion(+)
5e6fc3
5e6fc3
diff --git a/src/makeguids.c b/src/makeguids.c
5e6fc3
index f84fbb81166..a15356b152e 100644
5e6fc3
--- a/src/makeguids.c
5e6fc3
+++ b/src/makeguids.c
5e6fc3
@@ -147,6 +147,7 @@ main(int argc, char *argv[])
5e6fc3
 		outbuf = realloc(outbuf, line * sizeof (struct guidname));
5e6fc3
 		if (!outbuf)
5e6fc3
 			err(1, "makeguids");
5e6fc3
+		memset(outbuf + line - 1, 0, sizeof(struct guidname));
5e6fc3
 
5e6fc3
 		char *symbol = strchr(guidstr, '\t');
5e6fc3
 		if (symbol == NULL)
5e6fc3
-- 
5e6fc3
2.17.1
5e6fc3