projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de750d7
)
btrfs-progs: Fix over-sized limit on buffer
author
Hugo Mills
<hugo@carfax.org.uk>
Sun, 12 Jun 2011 20:52:39 +0000
(21:52 +0100)
committer
Chris Mason
<chris.mason@oracle.com>
Tue, 25 Oct 2011 13:18:58 +0000
(09:18 -0400)
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>
btrfs_cmds.c
patch
|
blob
|
history
diff --git
a/btrfs_cmds.c
b/btrfs_cmds.c
index 505322d622cb431bcb9a40896e992be284ff9f1a..da5bd91852931b45f63e51ed6c0fc34ff9110d61 100644
(file)
--- 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;