This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] * elf/dl-load.c (open_path): avoid writing to 'env_path_list' when none of the search directories exist.


From: Bram <bug_rh@spam.wizbit.be>

---

This patch was submitted to BZ#15378 over a year ago.  I have an Arch Linux
user running into this bug who confirms the patch fixes their issues.

ChangeLog:

2014-10-xx  Bram  <bug_rh@spam.wizbit.be>

	[BZ #15378]
	* elf/dl-load.c (open_path): Avoid writing to 'env_path_list'
	when none of the search directories exist.

 elf/dl-load.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/elf/dl-load.c b/elf/dl-load.c
index 9dd40e3..3ac64f3 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1897,9 +1897,9 @@ open_path (const char *name, size_t namelen, int mode,
       if (sps->malloced)
 	free (sps->dirs);
 
-      /* rtld_search_dirs is attribute_relro, therefore avoid writing
-	 into it.  */
-      if (sps != &rtld_search_dirs)
+      /* rtld_search_dirs and env_path_list are attribute_relro, therefore
+         avoid writing into it.  */
+      if (sps != &rtld_search_dirs && sps != &env_path_list)
 	sps->dirs = (void *) -1;
     }
 
-- 
2.1.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]