summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog/lib/src/gf-changelog.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/changelog/lib/src/gf-changelog.c')
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/changelog/lib/src/gf-changelog.c b/xlators/features/changelog/lib/src/gf-changelog.c
index f2a5135e12a..82abc662632 100644
--- a/xlators/features/changelog/lib/src/gf-changelog.c
+++ b/xlators/features/changelog/lib/src/gf-changelog.c
@@ -357,7 +357,8 @@ gf_setup_brick_connection (xlator_t *this,
entry->connstate = GF_CHANGELOG_CONN_STATE_PENDING;
entry->notify = brick->filter;
- (void) strncpy (entry->brick, brick->brick_path, PATH_MAX);
+ (void) strncpy (entry->brick, brick->brick_path, PATH_MAX-1);
+ entry->brick[PATH_MAX-1] = 0;
entry->this = this;
entry->invokerxl = xl;