Skip to contentSkip to conversation

erofs-utils: mkfs: fix AUFS whiteouts for tarerofs

PATCH New Gao Xiang 1 participant 1 message Jun 25, 2025 Library code

lore
Share & tools
lore

Gao Xiang

author
#0 lore raw

PATCH 1/1 erofs-utils: mkfs: fix AUFS whiteouts for tarerofs

Fix the misuse strcmp() for whiteouts.

Fixes 73e321a0fb3b ("erofs-utils: lib: consolidate erofs_rebuild_get_dentry()")
---
 lib/rebuild.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/rebuild.c +1 -1
index 6ae5ddf..576d9d0 100644
@@ -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;
 				}
Signature · 1 line
2.43.5