diff options
author | Pedro Alves <palves@redhat.com> | 2012-11-26 14:19:31 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-11-26 14:19:31 +0000 |
commit | 54625e3a2ad2f8120edab2c4b35519c3fe448fe6 (patch) | |
tree | 318ceb93f282931d0a5f468d5038515c58b6a87f /gdb/nbsd-nat.c | |
parent | 210b2c6cf73a2e2ec2987dbbef629e97306578b5 (diff) | |
download | gdb-54625e3a2ad2f8120edab2c4b35519c3fe448fe6.tar.gz |
gdb/
2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
Pedro Alves <palves@redhat.com>
* common/linux-osdata.c (linux_xfer_osdata_fds): Decrease buffer
size parameter passed to readlink by one byte.
* fbsd-nat.c (fbsd_pid_to_exec_file): Ditto.
* linux-nat.c (linux_child_pid_to_exec_file): Ditto.
* nbsd-nat.c (nbsd_pid_to_exec_file): Ditto.
* inf-child.c (inf_child_fileio_readlink): Decrease local buffer's
size by one byte.
gdb/gdbserver/
2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
* hostio.c (handle_readlink): Decrease buffer size
parameter passed to readlink by one byte.
Diffstat (limited to 'gdb/nbsd-nat.c')
-rw-r--r-- | gdb/nbsd-nat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/nbsd-nat.c b/gdb/nbsd-nat.c index 14b562f140f..7f5df6611ab 100644 --- a/gdb/nbsd-nat.c +++ b/gdb/nbsd-nat.c @@ -34,7 +34,7 @@ nbsd_pid_to_exec_file (int pid) char *path; path = xstrprintf ("/proc/%d/exe", pid); - if (readlink (path, buf, MAXPATHLEN) == -1) + if (readlink (path, buf, MAXPATHLEN - 1) == -1) { xfree (buf); buf = NULL; |