From: Jan Kratochvil Date: Mon, 30 May 2011 19:26:36 +0000 (+0000) Subject: gdb/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=07e78767d6552aefc47e2a259f7092ac8e2ef5cb;p=binutils-gdb.git gdb/ * linux-nat.c (linux_lwp_is_zombie): Use xsnprintf. --- 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) {