From 6248b360c8c3b055b36b84b4bd37ec20a5915a89 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 28 Jul 2019 02:31:21 +0200 Subject: Fix missing initialization of file fragment fields Despite having a flag for that now, they still need to be initialized because they are written straight to disk. Fixes: d4d1854aaed867d28ebfc97afb3518254ab6fd4b Signed-off-by: David Oberhollenzer --- lib/fstree/mknode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/fstree/mknode.c b/lib/fstree/mknode.c index d343145..18602e4 100644 --- a/lib/fstree/mknode.c +++ b/lib/fstree/mknode.c @@ -60,6 +60,8 @@ tree_node_t *fstree_mknode(fstree_t *fs, tree_node_t *parent, const char *name, case S_IFREG: n->data.file = (file_info_t *)n->payload; n->data.file->size = sb->st_size; + n->data.file->fragment = 0xFFFFFFFF; + n->data.file->fragment_offset = 0xFFFFFFFF; if (extra == NULL) break; -- cgit v1.2.3