summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorcao <[email protected]>2016-10-19 01:31:57 +0800
committerBrian Behlendorf <[email protected]>2016-10-18 10:31:57 -0700
commit1b81ab46d060257288ee9739f7e9c5199deb901b (patch)
treeffd332369ef82b4169e7d252c48dbed8c1ff63b6 /module/zfs
parentdf7492240ab628f245a5400086ab898c8e33b3da (diff)
Fix coverity defects: CID 49339, 153393
CID 49339: Type:Buffer not null terminated CID 153393: Type:Buffer not null terminated Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: <cao.xuewen [email protected]> Closes #5296
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/zfs_vfsops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c
index 63b7f9230..eb73f3b60 100644
--- a/module/zfs/zfs_vfsops.c
+++ b/module/zfs/zfs_vfsops.c
@@ -553,7 +553,7 @@ zfs_userspace_one(zfs_sb_t *zsb, zfs_userquota_prop_t type,
return (0);
if (type == ZFS_PROP_USEROBJUSED || type == ZFS_PROP_GROUPOBJUSED) {
- strncpy(buf, DMU_OBJACCT_PREFIX, DMU_OBJACCT_PREFIX_LEN);
+ strlcpy(buf, DMU_OBJACCT_PREFIX, DMU_OBJACCT_PREFIX_LEN);
offset = DMU_OBJACCT_PREFIX_LEN;
}