diff options
author | luozhengzheng <[email protected]> | 2016-09-18 06:08:54 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-09-17 15:08:54 -0700 |
commit | 30f3f2e13c01bf1c881b2f3bb1236fca9f87a8e5 (patch) | |
tree | 8370f7f96bc86a483a9c754e05f7d3e504a7aa81 /cmd | |
parent | 9ea9e0b9a1f15b1e3b6b89bbc29d2a68df87ab3c (diff) |
Fix Coverity defects
CID 147659, 150952 and 147645
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: luozhengzheng <[email protected]>
Closes #5103
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/zpool/zpool_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index e512688b7..59e56bc0e 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -7440,7 +7440,7 @@ main(int argc, char **argv) */ char buf[16384]; int fd = open(ZFS_DEV, O_RDWR); - (void) strcpy((void *)buf, argv[2]); + (void) strlcpy((void *)buf, argv[2], sizeof (buf)); return (!!ioctl(fd, ZFS_IOC_POOL_FREEZE, buf)); } else { (void) fprintf(stderr, gettext("unrecognized " |