OSDN Git Service
(root)
/
android-x86
/
external-efivar.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8d7e54
)
makeguids: initialize memory
author
Bernhard M. Wiedemann
<bwiedemann@suse.de>
Tue, 24 Jul 2018 07:34:21 +0000
(09:34 +0200)
committer
Peter Jones
<pmjones@gmail.com>
Fri, 3 Aug 2018 13:46:05 +0000
(08:46 -0500)
so that we do not write uninitialized memory into guids.bin and names.bin
which made the resulting libefivar.so.1.36 unreproducible.
See https://reproducible-builds.org/ for why this matters.
src/makeguids.c
patch
|
blob
|
history
diff --git
a/src/makeguids.c
b/src/makeguids.c
index
f84fbb8
..
a15356b
100644
(file)
--- a/
src/makeguids.c
+++ b/
src/makeguids.c
@@
-147,6
+147,7
@@
main(int argc, char *argv[])
outbuf = realloc(outbuf, line * sizeof (struct guidname));
if (!outbuf)
err(1, "makeguids");
+ memset(outbuf + line - 1, 0, sizeof(struct guidname));
char *symbol = strchr(guidstr, '\t');
if (symbol == NULL)