gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 30 May 2011 19:26:36 +0000 (19:26 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 30 May 2011 19:26:36 +0000 (19:26 +0000)
* linux-nat.c (linux_lwp_is_zombie): Use xsnprintf.

gdb/ChangeLog
gdb/linux-nat.c

index 17db175..649efcd 100644 (file)
@@ -1,3 +1,7 @@
+2011-05-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * linux-nat.c (linux_lwp_is_zombie): Use xsnprintf.
+
 2011-05-30  Pedro Alves  <pedro@codesourcery.com>
 
        * continuations.h (continuation_ftype): Add `err' parameter.
index 4f62b7e..7ae1967 100644 (file)
@@ -2365,7 +2365,7 @@ linux_lwp_is_zombie (long lwp)
   FILE *procfile;
   int retval = 0;
 
-  sprintf (buffer, "/proc/%ld/status", lwp);
+  xsnprintf (buffer, sizeof (buffer), "/proc/%ld/status", lwp);
   procfile = fopen (buffer, "r");
   if (procfile == NULL)
     {