aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-11-26 14:19:33 +0000
committerPedro Alves <palves@redhat.com>2012-11-26 14:19:33 +0000
commit0270a750ba588a8ad521e68be851772bac9c44f1 (patch)
tree1b3e72db7d918bc2c45cdf1f4909213bffe434fa /gdb/gdbserver
parent8c29b58e98b4a6d4354b0a5bea6af5ec47cc10aa (diff)
downloadgdb-0270a750ba588a8ad521e68be851772bac9c44f1.zip
gdb-0270a750ba588a8ad521e68be851772bac9c44f1.tar.gz
gdb-0270a750ba588a8ad521e68be851772bac9c44f1.tar.bz2
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/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/hostio.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index efebfb1..0b1fb81 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
+
+ * hostio.c (handle_readlink): Decrease buffer size
+ parameter passed to readlink by one byte.
+
2012-11-26 Yao Qi <yao@codesourcery.com>
* configure.ac (build_warnings): Append '-Wempty-body'.
diff --git a/gdb/gdbserver/hostio.c b/gdb/gdbserver/hostio.c
index 72e334c..e89e100 100644
--- a/gdb/gdbserver/hostio.c
+++ b/gdb/gdbserver/hostio.c
@@ -483,7 +483,7 @@ handle_readlink (char *own_buf, int *new_packet_len)
return;
}
- ret = readlink (filename, linkname, sizeof linkname);
+ ret = readlink (filename, linkname, sizeof (linkname) - 1);
if (ret == -1)
{
hostio_error (own_buf);