Add LiE-2.2.2-memory-init.patch to make build more reproducible (boo#1061220) OBS-URL: https://build.opensuse.org/request/show/530372 OBS-URL: https://build.opensuse.org/package/show/science/LiE?expand=0&rev=7
32 lines
1.0 KiB
Diff
32 lines
1.0 KiB
Diff
Tried upstreaming via https://github.com/davidsd/lie/pull/1
|
|
and emailing Marc van Leeuwen
|
|
|
|
Avoid writing uninitialized stack memory into INFO.ind and LEARN.ind
|
|
(probably required because compilers do padding on structs)
|
|
to make package builds reproducible
|
|
|
|
Index: LiE/util/infoind.c
|
|
===================================================================
|
|
--- LiE.orig/util/infoind.c
|
|
+++ LiE/util/infoind.c
|
|
@@ -70,6 +70,7 @@ int main(void)
|
|
FILE *indexpt,*infopt;
|
|
info_index_tp info; /* current info record */
|
|
|
|
+ memset(&info, 0, sizeof(info));
|
|
strcpy(indexfil,INDEXFIL);
|
|
indexpt=fopen(indexfil,writemode);
|
|
if (indexpt==NULL)
|
|
Index: LiE/util/learnind.c
|
|
===================================================================
|
|
--- LiE.orig/util/learnind.c
|
|
+++ LiE/util/learnind.c
|
|
@@ -24,6 +24,7 @@ int main(void)
|
|
FILE *indexpt,*learnpt;
|
|
learn_index_tp learn;
|
|
|
|
+ memset(&learn, 0, sizeof(learn));
|
|
strcpy(indexfil,INDEXFIL); strcpy(learnfil,LEARNFIL);
|
|
learnpt=fopen(learnfil,readmode);
|
|
if (learnpt==NULL)
|