Skip to contentSkip to conversation

erofs-utils: mkfs: fix segfault with `--compress-hints`

PATCH New Gao Xiang 1 participant 1 message Oct 6

lore
Share & tools
lore

Gao Xiang

author
#0 lore raw

PATCH 1/1 erofs-utils: mkfs: fix segfault with `--compress-hints`

Reported-and-suggested-by Jan Čermák <[email protected]>
Fixes bb9f75521465 ("erofs-utils: lib: migrate `c_compr_opts`")
---
 mkfs/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mkfs/main.c +1 -1
index f0d3d8c..93123c1 100644
@@ -1886,6 +1886,7 @@ int main(int argc, char **argv)
 		}
 	}
 
+	importer_params.z_paramsets = mkfscfg.zcfgs;
 	err = erofs_load_compress_hints(&importer, &g_sbi);
 	if (err) {
 		erofs_err("failed to load compress hints %s",
@@ -1895,7 +1896,6 @@ int main(int argc, char **argv)
 
 	if (mkfscfg.inlinexattr_tolerance < 0)
 		importer_params.no_xattrs = true;
-	importer_params.z_paramsets = mkfscfg.zcfgs;
 	importer_params.source = cfg.c_src_path;
 	importer_params.no_datainline = mkfs_no_datainline;
 	importer_params.dot_omitted = mkfs_dot_omitted;
Signature · 1 line
2.50.1 (Apple Git-155)