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

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