aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-m32r-sdi.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote-m32r-sdi.c')
-rw-r--r--gdb/remote-m32r-sdi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c
index f7addea..c6ff539 100644
--- a/gdb/remote-m32r-sdi.c
+++ b/gdb/remote-m32r-sdi.c
@@ -376,14 +376,14 @@ m32r_open (char *args, int from_tty)
push_target (&m32r_ops);
if (args == NULL)
- sprintf (hostname, "localhost:%d", SDIPORT);
+ xsnprintf (hostname, sizeof (hostname), "localhost:%d", SDIPORT);
else
{
port_str = strchr (args, ':');
if (port_str == NULL)
- sprintf (hostname, "%s:%d", args, SDIPORT);
+ xsnprintf (hostname, sizeof (hostname), "%s:%d", args, SDIPORT);
else
- strcpy (hostname, args);
+ xsnprintf (hostname, sizeof (hostname), "%s", args);
}
sdi_desc = serial_open (hostname);