diff options
-rw-r--r-- | fs/f2fs/xattr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index 0121e4595ccd..503c2451131e 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.c | |||
@@ -407,6 +407,8 @@ int f2fs_getxattr(struct inode *inode, int name_index, const char *name, | |||
407 | if (name == NULL) | 407 | if (name == NULL) |
408 | return -EINVAL; | 408 | return -EINVAL; |
409 | name_len = strlen(name); | 409 | name_len = strlen(name); |
410 | if (name_len > F2FS_NAME_LEN) | ||
411 | return -ERANGE; | ||
410 | 412 | ||
411 | base_addr = read_all_xattrs(inode, NULL); | 413 | base_addr = read_all_xattrs(inode, NULL); |
412 | if (!base_addr) | 414 | if (!base_addr) |