Commit 6dfaee0232282bb36fe0cd07674d8e6c1faa1ac9

Stefan Sperling 2018-11-05T19:09:07

initialize te->mode in parse_tree_entry()

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/lib/object_parse.c b/lib/object_parse.c
index 5b1301e..6421da7 100644
--- a/lib/object_parse.c
+++ b/lib/object_parse.c
@@ -454,6 +454,7 @@ parse_tree_entry(struct got_tree_entry **te, size_t *elen, char *buf,
 		*te = NULL;
 		return err;
 	}
+	(*te)->mode = 0;
 	while (*p != ' ') {
 		if (*p < '0' && *p > '7') {
 			err = got_error(GOT_ERR_BAD_OBJ_DATA);