ARI fixes: sprintf rule.
[deliverable/binutils-gdb.git] / gdb / remote-m32r-sdi.c
index f7addea2186dc8848168e9964a5e53de97a404ce..c6ff53900f588426e1fcbe8a9bf3efa669cb1c47 100644 (file)
@@ -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);
This page took 0.022955 seconds and 4 git commands to generate.