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