From 1760874da6e4a6934751ea12cf2c06eae936b53c Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Sat, 29 Oct 2011 12:24:38 -0400 Subject: Fix readlink call in ldconfig's chroot handling --- elf/chroot_canon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'elf/chroot_canon.c') diff --git a/elf/chroot_canon.c b/elf/chroot_canon.c index 54a6a4cc96..b639cfa82d 100644 --- a/elf/chroot_canon.c +++ b/elf/chroot_canon.c @@ -1,5 +1,5 @@ /* Return the canonical absolute name of a given file inside chroot. - Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005,2010 + Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005,2010,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -135,7 +135,7 @@ chroot_canon (const char *chroot, const char *name) goto error; } - n = readlink (rpath, buf, PATH_MAX); + n = readlink (rpath, buf, PATH_MAX - 1); if (n < 0) { if (*end == '\0') -- cgit 1.4.1