avoid several strncpy-induced buffer overruns
authorJim Meyering <meyering@redhat.com>
Fri, 20 Apr 2012 19:27:25 +0000 (21:27 +0200)
committerHugo Mills <hugo@carfax.org.uk>
Tue, 5 Jun 2012 18:56:20 +0000 (19:56 +0100)
commit54e345b5c2339dee170595f686dbd26937620262
treeb1b5c2267023e9d117906d979a042536c17b0d31
parent47f029cc8bcf5a03ef6ee939fcb64007aafa50c4
avoid several strncpy-induced buffer overruns

* restore.c (main): Ensure strncpy-copied dir_name is NUL-terminated.
* btrfsctl.c (main): Likewise, for a command-line argument.
* utils.c (multiple functions): Likewise.
* btrfs-list.c (add_root): Likewise.
* btrfslabel.c (change_label_unmounted): Likewise.
* cmds-device.c (cmd_add_dev, cmd_rm_dev, cmd_scan_dev): Likewise.
* cmds-filesystem.c (cmd_resize): Likewise.
* cmds-subvolume.c (cmd_subvol_create, cmd_subvol_delete, cmd_snapshot):
Likewise.

Reviewed-by: Josef Bacik <josef@redhat.com>
btrfs-list.c
btrfsctl.c
btrfslabel.c
cmds-device.c
cmds-filesystem.c
cmds-subvolume.c
restore.c
utils.c