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:
parent
51ab20a7b8
commit
086dbf661a
|
@ -1,5 +1,8 @@
|
||||||
2011-02-27 Michael Snyder <msnyder@vmware.com>
|
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
|
* symtab.c (rbreak_command): Move variable 'file_name' to
|
||||||
outer scope.
|
outer scope.
|
||||||
|
|
||||||
|
|
|
@ -227,7 +227,7 @@ tui_get_function_from_frame (struct frame_info *fi)
|
||||||
them because the status line is too short to display them. */
|
them because the status line is too short to display them. */
|
||||||
if (*p == '<')
|
if (*p == '<')
|
||||||
p++;
|
p++;
|
||||||
strncpy (name, p, sizeof (name));
|
strncpy (name, p, sizeof (name) - 1);
|
||||||
p = strchr (name, '(');
|
p = strchr (name, '(');
|
||||||
if (!p)
|
if (!p)
|
||||||
p = strchr (name, '>');
|
p = strchr (name, '>');
|
||||||
|
|
Loading…
Reference in New Issue