summaryrefslogtreecommitdiffstats
path: root/module/zfs/dmu_objset.c
diff options
context:
space:
mode:
authorluozhengzheng <[email protected]>2016-10-13 04:24:03 +0800
committerBrian Behlendorf <[email protected]>2016-10-12 13:24:03 -0700
commit1f51b525ff67e2c5cc26d968287bd9a7579acebd (patch)
tree52fa5cb48a02ef21243f2cea6f44fc75701293b5 /module/zfs/dmu_objset.c
parentef78750d98f7389b05567c5abe95aacaece91736 (diff)
Fix coverity defects: CID 153394
coverity scan CID 153394, Type:String overflow Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: luozhengzheng <[email protected]> Closes #5263
Diffstat (limited to 'module/zfs/dmu_objset.c')
-rw-r--r--module/zfs/dmu_objset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c
index b1f05cb61..cce3e732c 100644
--- a/module/zfs/dmu_objset.c
+++ b/module/zfs/dmu_objset.c
@@ -1405,7 +1405,7 @@ userquota_update_cache(avl_tree_t *avl, const char *id, int64_t delta)
uqn = avl_find(avl, (const void *)id, &idx);
if (uqn == NULL) {
uqn = kmem_zalloc(sizeof (*uqn), KM_SLEEP);
- strcpy(uqn->uqn_id, id);
+ strlcpy(uqn->uqn_id, id, sizeof (uqn->uqn_id));
avl_insert(avl, uqn, idx);
}
uqn->uqn_delta += delta;