This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.14-490-g10fb0bf
- From: schwab at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 4 Nov 2011 09:25:35 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.14-490-g10fb0bf
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 10fb0bfab13b7cd6cd9b22c2edced0fd3a3b8b32 (commit)
from a9ae54a136d743103cd9e266c7d22769ea440c09 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=10fb0bfab13b7cd6cd9b22c2edced0fd3a3b8b32
commit 10fb0bfab13b7cd6cd9b22c2edced0fd3a3b8b32
Author: Andreas Schwab <schwab@redhat.com>
Date: Fri Nov 4 10:21:15 2011 +0100
Fix off-by-one when reading link name in sprof
diff --git a/ChangeLog b/ChangeLog
index a65182a..6622603 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-11-04 Andreas Schwab <schwab@redhat.com>
+
+ * elf/sprof.c (load_shobj): Fix off-by-one when reading link name.
+
2011-11-03 Andreas Schwab <schwab@redhat.com>
* nscd/nscd.c (main): Don't start AVC thread until credentials are
diff --git a/elf/sprof.c b/elf/sprof.c
index 6182599..c90c22c 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';
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
elf/sprof.c | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU C Library master sources