summaryrefslogtreecommitdiffstats
path: root/xlators/debug
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/debug')
-rw-r--r--xlators/debug/trace/src/trace.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/debug/trace/src/trace.c b/xlators/debug/trace/src/trace.c
index 451ef9a0fe7..d9f88bff78e 100644
--- a/xlators/debug/trace/src/trace.c
+++ b/xlators/debug/trace/src/trace.c
@@ -3185,11 +3185,13 @@ init (xlator_t *this)
if (gf_fop_list[i])
strncpy (trace_fop_names[i].name,
gf_fop_list[i],
- strlen (gf_fop_list[i]));
+ sizeof (trace_fop_names[i].name));
else
strncpy (trace_fop_names[i].name, ":O",
- strlen (":O"));
+ sizeof (trace_fop_names[i].name));
trace_fop_names[i].enabled = 1;
+ trace_fop_names[i].name[sizeof (
+ trace_fop_names[i].name) - 1] = 0;
}
}