public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] rtld: properly handle root directory in load path (bug 30435)
@ 2023-05-25 10:25 Andreas Schwab
  0 siblings, 0 replies; only message in thread
From: Andreas Schwab @ 2023-05-25 10:25 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e0189b25403f8b67e7a5513d6c33fb09cb2e5e20

commit e0189b25403f8b67e7a5513d6c33fb09cb2e5e20
Author: Andreas Schwab <schwab@suse.de>
Date:   Tue May 16 14:41:46 2023 +0200

    rtld: properly handle root directory in load path (bug 30435)
    
    Don't strip the trailing slash when checking for existence of a load path
    element to handle the special case of the root directory.

Diff:
---
 elf/dl-load.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elf/dl-load.c b/elf/dl-load.c
index 39c63ff1b3..2aa487b49a 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1859,7 +1859,7 @@ open_path (const char *name, size_t namelen, int mode,
 		     test whether there is any directory at all.  */
 		  struct __stat64_t64 st;
 
-		  buf[buflen - namelen - 1] = '\0';
+		  buf[buflen - namelen] = '\0';
 
 		  if (__stat64_time64 (buf, &st) != 0
 		      || ! S_ISDIR (st.st_mode))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-25 10:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-25 10:25 [glibc] rtld: properly handle root directory in load path (bug 30435) Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).