about summary refs log tree commit diff
path: root/Src/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/parse.c')
-rw-r--r--Src/parse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/parse.c b/Src/parse.c
index f53c216d8..7fb5dc871 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -2536,7 +2536,7 @@ bin_zcompile(char *nam, char **args, Options ops, UNUSED(int func))
 static Wordcode
 load_dump_header(char *nam, char *name, int err)
 {
-    int fd, v = 0;
+    int fd, v = 1;
     wordcode buf[FD_PRELEN + 1];
 
     if ((fd = open(name, O_RDONLY)) < 0) {
@@ -2625,6 +2625,8 @@ write_dump(int dfd, LinkList progs, int map, int hlen, int tlen)
     if (map == 1)
 	map = (tlen >= FD_MINMAP);
 
+    memset(pre, 0, sizeof(wordcode) * FD_PRELEN);
+
     for (ohlen = hlen; ; hlen = ohlen) {
 	fdmagic(pre) = (other ? FD_OMAGIC : FD_MAGIC);
 	fdsetflags(pre, ((map ? FDF_MAP : 0) | other));