summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Mills <hugo@carfax.org.uk>2011-06-12 21:52:39 +0100
committerChris Mason <chris.mason@oracle.com>2011-10-25 09:18:58 -0400
commitdfa328ac4e3e077a8972c171715cb64976e8d0f3 (patch)
tree65fca7b7e2216aac834b193bfabd953c7a3fa9a5
parentde750d7a0d5a354eeec002b2db779cad42323870 (diff)
downloadbtrfs-progs-dfa328ac4e3e077a8972c171715cb64976e8d0f3.tar.gz
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>
-rw-r--r--btrfs_cmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/btrfs_cmds.c b/btrfs_cmds.c
index 505322d6..da5bd918 100644
--- a/btrfs_cmds.c
+++ b/btrfs_cmds.c
@@ -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;