diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-05-30 19:26:36 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-05-30 19:26:36 +0000 |
commit | 07e78767d6552aefc47e2a259f7092ac8e2ef5cb (patch) | |
tree | 39dc19335e9e6dc7dc5a030ac9a095057ce1b65a | |
parent | 2011-05-30 Pedro Alves <pedro@codesourcery.com> (diff) | |
download | binutils-gdb-07e78767d6552aefc47e2a259f7092ac8e2ef5cb.tar.gz binutils-gdb-07e78767d6552aefc47e2a259f7092ac8e2ef5cb.tar.bz2 binutils-gdb-07e78767d6552aefc47e2a259f7092ac8e2ef5cb.zip |
gdb/
* linux-nat.c (linux_lwp_is_zombie): Use xsnprintf.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/linux-nat.c | 2 |
2 files changed, 5 insertions, 1 deletions
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 <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 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) { |