fix an bug related to extension list. there was the potential bug in set_cold_files function, namei.c. Signed-off-by: Dongho Sim <dh.sim@xxxxxxxxxxx> --- mkfs/f2fs_format.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c index 9dbdc1d..d485808 100644 --- a/mkfs/f2fs_format.c +++ b/mkfs/f2fs_format.c @@ -154,7 +154,7 @@ static void configure_extension_list(void) memcpy(super_block.extension_list[i++], *extlist, name_len); extlist++; } - super_block.extension_count = i - 1; + super_block.extension_count = i; if (!ext_str) return; @@ -165,11 +165,11 @@ static void configure_extension_list(void) name_len = strlen(ue); memcpy(super_block.extension_list[i++], ue, name_len); ue = strtok(NULL, ","); - if (i > F2FS_MAX_EXTENSION) + if (i >= F2FS_MAX_EXTENSION) break; } - super_block.extension_count = i - 1; + super_block.extension_count = i; free(config.extension_list); } -- 1.7.9.5 ÿ淸º{.nÇ+돴윯돪†+%듚ÿ깁負¥Šwÿº{.nÇ+돴¥Š{깰ûz彈þ)í끾èw*jgП¨¶‰šŽ듶¢jÿ¾?G«앶ÿ◀◁¦j:+v돣ŠwèjØm¶Ÿÿ?®w?듺þf"·hš뤴얎ÿ녪¥