summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker-quota.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/marker/src/marker-quota.c')
-rw-r--r--xlators/features/marker/src/marker-quota.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index f6a0df8..620201d 100644
--- a/xlators/features/marker/src/marker-quota.c
+++ b/xlators/features/marker/src/marker-quota.c
@@ -2169,7 +2169,11 @@ mq_req_xattr (xlator_t *this, loc_t *loc, dict_t *dict,
if (ret < 0)
goto out;
if (size_key)
- strncpy (size_key, key, QUOTA_KEY_MAX);
+ if (snprintf (size_key, QUOTA_KEY_MAX, "%s", key)
+ >= QUOTA_KEY_MAX) {
+ ret = -1;
+ goto out;
+ }
ret = dict_set_uint64 (dict, key, 0);
if (ret < 0)