diff options
author | cao <[email protected]> | 2016-09-30 03:06:14 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-09-29 12:06:14 -0700 |
commit | c9d61adbf8f422fe8d3bda45d9de9e82c757d0b0 (patch) | |
tree | d1c9b4684e6a08bc61927d635975e0d78daa771f /lib | |
parent | 12fa7f3436fbd89f4d6b00c2c076405e7a21d62f (diff) |
Fix coverity defects: 147658, 147652, 147651
coverity scan CID:147658, Type:copy into fixed size buffer.
coverity scan CID:147652, Type:copy into fixed size buffer.
coverity scan CID:147651, Type:copy into fixed size buffer.
Reviewed-by: Richard Laager <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: cao.xuewen <[email protected]>
Closes #5160
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/libzfs_sendrecv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index 959986389..e409899a2 100644 --- a/lib/libzfs/libzfs_sendrecv.c +++ b/lib/libzfs/libzfs_sendrecv.c @@ -1221,7 +1221,8 @@ dump_snapshot(zfs_handle_t *zhp, void *arg) if (!sdd->seenfrom && isfromsnap) { gather_holds(zhp, sdd); sdd->seenfrom = B_TRUE; - (void) strcpy(sdd->prevsnap, thissnap); + (void) strlcpy(sdd->prevsnap, thissnap, + sizeof (sdd->prevsnap)); sdd->prevsnap_obj = zfs_prop_get_int(zhp, ZFS_PROP_OBJSETID); zfs_close(zhp); return (0); |