File LiE-2.2.2-memory-init.patch of Package LiE

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)
openSUSE Build Service is sponsored by