summaryrefslogtreecommitdiff
path: root/gdb/tui/tui-stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tui/tui-stack.c')
-rw-r--r--gdb/tui/tui-stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c
index d7b9716f9d9..f618d7c03cb 100644
--- a/gdb/tui/tui-stack.c
+++ b/gdb/tui/tui-stack.c
@@ -227,7 +227,7 @@ tui_get_function_from_frame (struct frame_info *fi)
them because the status line is too short to display them. */
if (*p == '<')
p++;
- strncpy (name, p, sizeof (name));
+ strncpy (name, p, sizeof (name) - 1);
p = strchr (name, '(');
if (!p)
p = strchr (name, '>');