summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
index 9e2a75f110f..38fea9dbaa4 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
@@ -264,7 +264,7 @@ glusterd_snap_volinfo_restore (dict_t *dict, dict_t *rsp_dict,
ret = dict_get_str (dict, key, &value);
if (!ret)
strncpy (new_brickinfo->mnt_opts, value,
- sizeof(new_brickinfo->mnt_opts));
+ sizeof(new_brickinfo->mnt_opts) - 1);
/* If the brick is not of this peer, or snapshot is missed *
* for the brick do not replace the xattr for it */