summaryrefslogtreecommitdiff
path: root/tools/perf/ui/tui/helpline.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/ui/tui/helpline.c')
-rw-r--r--tools/perf/ui/tui/helpline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/ui/tui/helpline.c b/tools/perf/ui/tui/helpline.c
index 4ca799aadb4e..93d6b7240285 100644
--- a/tools/perf/ui/tui/helpline.c
+++ b/tools/perf/ui/tui/helpline.c
@@ -24,7 +24,7 @@ static void tui_helpline__push(const char *msg)
SLsmg_set_color(0);
SLsmg_write_nstring((char *)msg, SLtt_Screen_Cols);
SLsmg_refresh();
- strncpy(ui_helpline__current, msg, sz)[sz - 1] = '\0';
+ strlcpy(ui_helpline__current, msg, sz);
}
static int tui_helpline__show(const char *format, va_list ap)