mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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 <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: cao.xuewen <cao.xuewen@zte.com.cn> Closes #5160
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user