Index: gdb/tui/tui-stack.c |
diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c |
index 8722058f29b7117c85012e43cea3f52f914672b2..262a6bf3143de6d8c71970e4e530945617ced2cb 100644 |
--- a/gdb/tui/tui-stack.c |
+++ b/gdb/tui/tui-stack.c |
@@ -228,6 +228,7 @@ tui_get_function_from_frame (struct frame_info *fi) |
if (*p == '<') |
p++; |
strncpy (name, p, sizeof (name) - 1); |
+ name[sizeof (name) - 1] = 0; |
p = strchr (name, '('); |
if (!p) |
p = strchr (name, '>'); |
@@ -378,7 +379,8 @@ tui_show_frame_info (struct frame_info *fi) |
} |
else |
{ |
- if (find_pc_partial_function (get_frame_pc (fi), (char **) NULL, |
+ if (find_pc_partial_function (get_frame_pc (fi), |
+ (const char **) NULL, |
&low, (CORE_ADDR) 0) == 0) |
{ |
/* There is no symbol available for current PC. There is no |