]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix coverity defects
authorluozhengzheng <luo.zhengzheng@zte.com.cn>
Thu, 22 Sep 2016 22:55:41 +0000 (06:55 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 22 Sep 2016 22:55:41 +0000 (15:55 -0700)
commit5df39c1e43e8d903ef4317e505cf85e64ef7e172
tree8470347847a8194d79edffe92ab6b310cc97dbdf
parent3ec68a4414ececbae227a508bcc7e236c358e64c
Fix coverity defects

1.coverity scan CID:147445 function zfs_do_send in zfs_main.c
Buffer not null terminated (BUFFER_SIZE_WARNING)

2.coverity scan CID:147443 function zfs_do_bookmark in zfs_main.c
Buffer not null terminated (BUFFER_SIZE_WARNING)

3.coverity scan CID:147660 function main in zinject.c
Passing string argv[0] of unknown size to strcpy
By the way, the leak of g_zfs is fixed.

4.coverity scan CID: 147442 function make_disks in zpool_vdev.c
Buffer not null terminated (BUFFER_SIZE_WARNING)

5.coverity scan CID: 147661 function main in dir_rd_update.c
passing string cp1 of unknown size to strcpy

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn>
Closes #5130
cmd/zfs/zfs_main.c
cmd/zinject/zinject.c
cmd/zpool/zpool_vdev.c
tests/zfs-tests/cmd/dir_rd_update/dir_rd_update.c