From fe18f823cbbd4fb90b5d2925210049f454e72f7c Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Mon, 28 Feb 2011 00:20:44 +0000 Subject: 2011-02-27 Michael Snyder * tui/tui-stack.c (tui_get_function_from_frame): Fix off by one error in strncpy. --- gdb/tui/tui-stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/tui') 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, '>'); -- cgit v1.2.1