aboutsummaryrefslogtreecommitdiff
path: root/gdb/common/linux-osdata.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/common/linux-osdata.c')
-rw-r--r--gdb/common/linux-osdata.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/common/linux-osdata.c b/gdb/common/linux-osdata.c
index d54f9d3..b275495 100644
--- a/gdb/common/linux-osdata.c
+++ b/gdb/common/linux-osdata.c
@@ -737,7 +737,7 @@ linux_xfer_osdata_fds (gdb_byte *readbuf,
continue;
fdname = xstrprintf ("%s/%s", pathname, dp2->d_name);
- rslt = readlink (fdname, buf, 1000);
+ rslt = readlink (fdname, buf, sizeof (buf) - 1);
if (rslt >= 0)
buf[rslt] = '\0';