Fix the misuse strcmp() for whiteouts. Fixes: 73e321a0fb3b ("erofs-utils: lib: consolidate erofs_rebuild_get_dentry()") Signed-off-by: Gao Xiang <hsiang...@linux.alibaba.com> --- lib/rebuild.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rebuild.c b/lib/rebuild.c index 6ae5ddf..576d9d0 100644 --- a/lib/rebuild.c +++ b/lib/rebuild.c @@ -113,7 +113,7 @@ struct erofs_dentry *erofs_rebuild_get_dentry(struct erofs_inode *pwd, *opq = true; break; } - if (!strcmp(s, AUFS_WH_PFX)) { + if (!strncmp(s, AUFS_WH_PFX, sizeof(AUFS_WH_PFX) - 1)) { s += sizeof(AUFS_WH_PFX) - 1; *whout = true; } -- 2.43.5