diff options
author | Andreas Schwab <schwab@suse.de> | 2023-05-16 14:41:46 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2023-05-25 11:47:12 +0200 |
commit | e0189b25403f8b67e7a5513d6c33fb09cb2e5e20 (patch) | |
tree | d93a96e805c2391b0db279861a9add72418c523e /elf | |
parent | 7aec73c40691b7dfa48d22941ff72238aebe82eb (diff) | |
download | glibc-e0189b25403f8b67e7a5513d6c33fb09cb2e5e20.zip glibc-e0189b25403f8b67e7a5513d6c33fb09cb2e5e20.tar.gz glibc-e0189b25403f8b67e7a5513d6c33fb09cb2e5e20.tar.bz2 |
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.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-load.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c index 39c63ff..2aa487b 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)) |