aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/linux-nat.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 17db175..649efcd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 4f62b7e..7ae1967 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -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)
{