2011-02-27 Michael Snyder <msnyder@vmware.com>

* tui/tui-stack.c (tui_get_function_from_frame): Fix off by one
	error in strncpy.
This commit is contained in:
Michael Snyder 2011-02-28 00:20:49 +00:00
parent 51ab20a7b8
commit 086dbf661a
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2011-02-27 Michael Snyder <msnyder@vmware.com>
* tui/tui-stack.c (tui_get_function_from_frame): Fix off by one
error in strncpy.
* symtab.c (rbreak_command): Move variable 'file_name' to
outer scope.

View File

@ -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, '>');