btrfs: Check name_len before reading btrfs_get_name
authorSu Yue <suy.fnst@cn.fujitsu.com>
Tue, 6 Jun 2017 09:57:06 +0000 (17:57 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 21 Jun 2017 17:16:04 +0000 (19:16 +0200)
commit488d7c4566536b8807381bc54e559fd43decd26a
tree0eff37754ed219cd199abb743083499983749336
parent59b0a7f2c7c1bf374db319fcc2c99305133d00d5
btrfs: Check name_len before reading btrfs_get_name

In btrfs_get_name, there's btrfs_search_slot and reads name from
inode_ref/root_ref.

Call btrfs_is_name_len_valid in btrfs_get_name.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/export.c