btrfs-progs/mkfs
Vladimir Panteleev 11e126b162 btrfs-progs: mkfs: fix xattr enumeration
Use the return value of listxattr instead of tokenizing.

The end of the extended attribute list is indicated by the return value,
not an empty list item (two consecutive NULs). Using strtok in this way
thus sometimes caused add_xattr_item to reuse stack data in xattr_list
from the previous invocation, thus querying attributes that are not
actually in the file's xattr list.

Issue: #194
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Vladimir Panteleev <git@vladimir.panteleev.md>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-10-14 17:27:56 +02:00
..
Makefile btrfs-progs: build: add stub makefile to image and mkfs 2019-07-04 15:36:01 +02:00
common.c btrfs-progs: utils: split device handling functions to own file 2019-07-04 02:06:34 +02:00
common.h btrfs-progs: mkfs: Fix typos in strings and comments 2018-06-07 16:37:40 +02:00
main.c btrfs-progs: mkfs: treat btrfs_add_to_fsid as fatal error 2019-09-04 16:08:17 +02:00
rootdir.c btrfs-progs: mkfs: fix xattr enumeration 2019-10-14 17:27:56 +02:00
rootdir.h btrfs-progs: mkfs/rootdir: Fix memory leak in traverse_directory() 2018-02-14 16:31:19 +01:00