mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Fix coverity defects: CID 153394
coverity scan CID 153394, Type:String overflow Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn> Closes #5263
This commit is contained in:
parent
ef78750d98
commit
1f51b525ff
@ -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);
|
uqn = avl_find(avl, (const void *)id, &idx);
|
||||||
if (uqn == NULL) {
|
if (uqn == NULL) {
|
||||||
uqn = kmem_zalloc(sizeof (*uqn), KM_SLEEP);
|
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);
|
avl_insert(avl, uqn, idx);
|
||||||
}
|
}
|
||||||
uqn->uqn_delta += delta;
|
uqn->uqn_delta += delta;
|
||||||
|
Loading…
Reference in New Issue
Block a user