Source: ispell
Version: 3.4.00-3
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: randomness
X-Debbugs-Cc: [email protected]
Hi!
While working on the “reproducible builds” effort [1], we have noticed
that the “buildhash” binary of ispell prints uninitialized memory to a file
The attached patch initializes memory allocated in the parser so all
fields are initialized to a deterministic value (zero).
Once applied, packages using buildhash can be built reproducibly in our
current experimental framework.
[1]: https://wiki.debian.org/ReproducibleBuilds
Regards,
Valentin
diff -r -u ispell-3.4.00.old/parse.y ispell-3.4.00/parse.y
--- ispell-3.4.00.old/parse.y 2015-08-15 14:29:14.233126031 +0000
+++ ispell-3.4.00/parse.y 2015-08-15 17:06:02.237484566 +0000
@@ -1204,7 +1204,7 @@
int i;
ent = (struct flagent *)
- malloc (sizeof (struct flagent));
+ calloc (1, sizeof (struct flagent));
if (ent == NULL)
{
yyerror (PARSE_Y_NO_SPACE);