From 54625e3a2ad2f8120edab2c4b35519c3fe448fe6 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 26 Nov 2012 14:19:31 +0000 Subject: gdb/ 2012-11-26 Maxime Villard Pedro Alves * 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 * hostio.c (handle_readlink): Decrease buffer size parameter passed to readlink by one byte. --- gdb/nbsd-nat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/nbsd-nat.c') 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; -- cgit v1.2.1