erofs-utils: mkfs: fix crash when failing to build tree
PATCH 1/1 erofs-utils: mkfs: fix crash when failing to build tree
For example: It crashes instead of cleanly erroring out if there's a file for which it doesn't have permissions to read (e.g. /etc/gshadow has mode 000).
Reported-by Jonathan Lebon <[email protected]>
Fixes 6a8e395ae4fd ("erofs-utils: fix up root inode for incremental builds")
Signed-off-by Gao Xiang <[email protected]>
--- mkfs/main.c | 1 + 1 file changed, 1 insertion(+)
mkfs/main.c +1 -0
@@ -1450,6 +1450,7 @@ int main(int argc, char **argv) root =erofs_mkfs_build_tree_from_path (&g_sbi, cfg.c_src_path);if (IS_ERR (root)) { err =PTR_ERR (root); + root =NULL ; goto exit; } }
Signature · 1 line
2.43.5