diff options
author | Chao Yu <chao2.yu@samsung.com> | 2015-11-30 10:41:07 +0000 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-08-24 11:43:29 -0700 |
commit | 0f7742c05da1ae0162e59b37a64266ef4e6514d8 (patch) | |
tree | d36d8e6dd495c2fad0d2d1c7a5b4331863c2b96d /mkfs | |
parent | 3103a7e137aff11657dc6c77eed2e0606750e4f9 (diff) | |
download | android_external_f2fs-tools-0f7742c05da1ae0162e59b37a64266ef4e6514d8.tar.gz android_external_f2fs-tools-0f7742c05da1ae0162e59b37a64266ef4e6514d8.tar.bz2 android_external_f2fs-tools-0f7742c05da1ae0162e59b37a64266ef4e6514d8.zip |
mkfs.f2fs: skip extension name that is too long
The length of extension name has a limit of 8 bytes. If an extension
exceeds the limitation, it will not be added to the extension_list.
Change-Id: I67765b42ff81a0e33b10aae9efa640f772187e9d
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'mkfs')
-rw-r--r-- | mkfs/f2fs_format.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c index a29d7ef..212df60 100644 --- a/mkfs/f2fs_format.c +++ b/mkfs/f2fs_format.c @@ -157,8 +157,13 @@ static void configure_extension_list(void) ue = strtok(ext_str, ", "); while (ue != NULL) { name_len = strlen(ue); + if (name_len >= 8) { + MSG(0, "\tWarn: Extension name (%s) is too long\n", ue); + goto next; + } if (!is_extension_exist(ue)) memcpy(sb.extension_list[i++], ue, name_len); +next: ue = strtok(NULL, ", "); if (i >= F2FS_MAX_EXTENSION) break; |