mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-13 02:45:02 +08:00
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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user