gdb/
[deliverable/binutils-gdb.git] / gdb / gnu-nat.c
index e6836d73f2e9efe35b0beb9dc5d50d3049d80888..1d74d0455c5fbfd69fdb71dcbfe6efa89929cc38 100644 (file)
@@ -2587,10 +2587,10 @@ proc_string (struct proc *proc)
   static char tid_str[80];
 
   if (proc_is_task (proc))
-    sprintf (tid_str, "process %d", proc->inf->pid);
+    xsnprintf (tid_str, sizeof (tid_str), "process %d", proc->inf->pid);
   else
-    sprintf (tid_str, "Thread %d.%d",
-            proc->inf->pid, proc->tid);
+    xsnprintf (tid_str, sizeof (tid_str), "Thread %d.%d",
+              proc->inf->pid, proc->tid);
   return tid_str;
 }
 
@@ -2607,7 +2607,7 @@ gnu_pid_to_str (struct target_ops *ops, ptid_t ptid)
     {
       static char tid_str[80];
 
-      sprintf (tid_str, "bogus thread id %d", tid);
+      xsnprintf (tid_str, sizeof (tid_str), "bogus thread id %d", tid);
       return tid_str;
     }
 }
This page took 0.024469 seconds and 4 git commands to generate.