btrfs: fix btrfs containers

Closes #2612.
Closes #2655.

Fixes: 9de31d5a13 ("tree-wide: s/strncpy()/strlcpy()/g")
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-09-28 11:24:46 +02:00
parent 56e28f9258
commit 37aa48515b
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -366,6 +366,7 @@ int btrfs_snapshot(const char *orig, const char *new)
goto out;
memset(&args, 0, sizeof(args));
args.fd = fd;
retlen = strlcpy(args.name, newname, BTRFS_SUBVOL_NAME_MAX);
if (retlen >= BTRFS_SUBVOL_NAME_MAX)
goto out;