Commit
d544db2078fd43 ("btrfs-progs: unify naming of return values in
cmd_subvolume_create()") converted the unchecked sprintf to path API but
the full_subvolpath is actually shorter than PATH_MAX. This could lead
to stack overflow for a really long path.
Signed-off-by: David Sterba <dsterba@suse.com>
u8 fsid[BTRFS_FSID_SIZE];
u64 subvolid = 0;
char uuidbuf[BTRFS_UUID_UNPARSED_SIZE];
- char full_subvolpath[BTRFS_SUBVOL_NAME_MAX];
+ char full_subvolpath[PATH_MAX];
struct seen_fsid *seen_fsid_hash[SEEN_FSID_HASH_SIZE] = { NULL, };
enum { COMMIT_AFTER = 1, COMMIT_EACH = 2 };
enum btrfs_util_error err;