Index: gdb/tui/tui-win.c |
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c |
index c12f036d501896cab5bfe4e550ecfd4e3a4b4095..78345122263f7a65247bca5f60cdc5e12e8c6577 100644 |
--- a/gdb/tui/tui-win.c |
+++ b/gdb/tui/tui-win.c |
@@ -1,6 +1,6 @@ |
/* TUI window generic functions. |
- Copyright (C) 1998-2004, 2006-2012 Free Software Foundation, Inc. |
+ Copyright (C) 1998-2013 Free Software Foundation, Inc. |
Contributed by Hewlett-Packard Company. |
@@ -46,7 +46,7 @@ |
#include "gdb_curses.h" |
-#include "gdb_string.h" |
+#include <string.h> |
#include <ctype.h> |
#include "readline/readline.h" |
@@ -466,10 +466,10 @@ tui_update_gdb_sizes (void) |
char cmd[50]; |
/* Set to TUI command window dimension or use readline values. */ |
- sprintf (cmd, "set width %d", |
+ xsnprintf (cmd, sizeof (cmd), "set width %d", |
tui_active ? TUI_CMD_WIN->generic.width : tui_term_width()); |
execute_command (cmd, 0); |
- sprintf (cmd, "set height %d", |
+ xsnprintf (cmd, sizeof (cmd), "set height %d", |
tui_active ? TUI_CMD_WIN->generic.height : tui_term_height()); |
execute_command (cmd, 0); |
} |