From 07e78767d6552aefc47e2a259f7092ac8e2ef5cb Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 30 May 2011 19:26:36 +0000 Subject: [PATCH] gdb/ * linux-nat.c (linux_lwp_is_zombie): Use xsnprintf. --- gdb/ChangeLog | 4 ++++ gdb/linux-nat.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 17db1752743..649efcd1875 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2011-05-30 Jan Kratochvil + + * linux-nat.c (linux_lwp_is_zombie): Use xsnprintf. + 2011-05-30 Pedro Alves * continuations.h (continuation_ftype): Add `err' parameter. diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 4f62b7e7c37..7ae19674215 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) { -- 2.30.2