Skip to content

Commit 171eae0

Browse files
committed
mkcompose: fix crash if no target for hardlink
Signed-off-by: Giuseppe Scrivano <[email protected]>
1 parent 7b1518f commit 171eae0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

tools/mkcomposefs.c

+2
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ static char *tree_resolve_hardlinks(dump_info *info)
368368
hardlink_fixup *fixup = info->hardlink_fixups;
369369
while (fixup != NULL) {
370370
hardlink_fixup *next = fixup->next;
371+
if (fixup->target_path == NULL)
372+
return make_error("No target path for the hardlink");
371373
struct lcfs_node_s *target =
372374
lookup_path(info->root, fixup->target_path);
373375
if (target == NULL)

0 commit comments

Comments
 (0)