summaryrefslogtreecommitdiffstats
path: root/module/zfs/dsl_dir.c
diff options
context:
space:
mode:
authorcao <[email protected]>2016-09-30 03:06:14 +0800
committerBrian Behlendorf <[email protected]>2016-09-29 12:06:14 -0700
commitc9d61adbf8f422fe8d3bda45d9de9e82c757d0b0 (patch)
treed1c9b4684e6a08bc61927d635975e0d78daa771f /module/zfs/dsl_dir.c
parent12fa7f3436fbd89f4d6b00c2c076405e7a21d62f (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 'module/zfs/dsl_dir.c')
-rw-r--r--module/zfs/dsl_dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/dsl_dir.c b/module/zfs/dsl_dir.c
index 59d382214..b21735235 100644
--- a/module/zfs/dsl_dir.c
+++ b/module/zfs/dsl_dir.c
@@ -1904,7 +1904,8 @@ dsl_dir_rename_sync(void *arg, dmu_tx_t *tx)
dd->dd_myname, tx);
ASSERT0(error);
- (void) strcpy(dd->dd_myname, mynewname);
+ (void) strlcpy(dd->dd_myname, mynewname,
+ sizeof (dd->dd_myname));
dsl_dir_rele(dd->dd_parent, dd);
dsl_dir_phys(dd)->dd_parent_obj = newparent->dd_object;
VERIFY0(dsl_dir_hold_obj(dp,