summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog/lib
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/changelog/lib')
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog-journal-handler.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c b/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
index 538a7faff68..c4e14708b5f 100644
--- a/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
+++ b/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
@@ -947,7 +947,8 @@ gf_changelog_journal_init (void *xl, struct gf_brick_spec *brick)
goto dealloc_private;
}
- (void) strncpy (jnl->jnl_brickpath, brick->brick_path, PATH_MAX);
+ (void) strncpy (jnl->jnl_brickpath, brick->brick_path, PATH_MAX-1);
+ jnl->jnl_brickpath[PATH_MAX-1] = 0;
/* RFC 3986 {de,en}coding */
for (i = 0; i < 256; i++) {