mirror of
https://github.com/kdave/btrfs-progs
synced 2025-03-22 02:46:31 +00:00
btrfs-progs: Fix over-sized limit on buffer
gcc-4.4 complains (rightly) that the strncpy has a limit too large for the array it's copying into. Use the correct array length. Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
This commit is contained in:
parent
de750d7a0d
commit
dfa328ac4e
@ -427,7 +427,7 @@ int do_clone(int argc, char **argv)
|
||||
}
|
||||
|
||||
args.fd = fd;
|
||||
strncpy(args.name, newname, BTRFS_PATH_NAME_MAX);
|
||||
strncpy(args.name, newname, BTRFS_SUBVOL_NAME_MAX);
|
||||
res = ioctl(fddst, BTRFS_IOC_SNAP_CREATE_V2, &args);
|
||||
e = errno;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user