mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 18:44:20 +08:00
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>
|
||||
|
||||
* 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.
|
||||
|
||||
|
@ -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, '>');
|
||||
|
Loading…
Reference in New Issue
Block a user