summaryrefslogtreecommitdiffstats
path: root/xlators/features/bit-rot/src/stub/bit-rot-stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/bit-rot/src/stub/bit-rot-stub.c')
-rw-r--r--xlators/features/bit-rot/src/stub/bit-rot-stub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.c b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
index fb187a3..10a1d81 100644
--- a/xlators/features/bit-rot/src/stub/bit-rot-stub.c
+++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
@@ -139,9 +139,9 @@ init (xlator_t *this)
GF_OPTION_INIT ("bitrot", priv->do_versioning, bool, free_mempool);
GF_OPTION_INIT ("export", tmp, str, free_mempool);
- memcpy (priv->export, tmp, strlen (tmp) + 1);
+ strncpy (priv->export, tmp, sizeof (priv->export));
- (void) snprintf (priv->stub_basepath, PATH_MAX,
+ (void) snprintf (priv->stub_basepath, sizeof (priv->stub_basepath),
"%s/%s", priv->export, BR_STUB_QUARANTINE_DIR);
(void) gettimeofday (&tv, NULL);