diff options
Diffstat (limited to 'elf')
-rw-r--r-- | elf/sprof.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/sprof.c b/elf/sprof.c index 61825999a7..c90c22c265 100644 --- a/elf/sprof.c +++ b/elf/sprof.c @@ -597,7 +597,7 @@ load_shobj (const char *name) char origprocname[sizeof (procpath) + sizeof (int) * 3]; snprintf (origprocname, sizeof (origprocname), procpath, fd); char *origlink = (char *) alloca (PATH_MAX); - ssize_t n = readlink (origprocname, origlink, PATH_MAX); + ssize_t n = readlink (origprocname, origlink, PATH_MAX - 1); if (n == -1) goto no_debuginfo; origlink[n] = '\0'; |