From 1f51b525ff67e2c5cc26d968287bd9a7579acebd Mon Sep 17 00:00:00 2001 From: luozhengzheng Date: Thu, 13 Oct 2016 04:24:03 +0800 Subject: [PATCH] Fix coverity defects: CID 153394 coverity scan CID 153394, Type:String overflow Reviewed-by: Brian Behlendorf Signed-off-by: luozhengzheng Closes #5263 --- module/zfs/dmu_objset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;