00db10
From 9317ea653afc26402387cac67042f9890af6add2 Mon Sep 17 00:00:00 2001
00db10
From: Bram <bug_rh@spam.wizbit.be>
00db10
Date: Thu, 18 Apr 2013 16:50:49 +0200
00db10
Subject: [PATCH] Fix segmentation fault when LD_LIBRARY_PATH contains only
00db10
 non-existings paths
00db10
00db10
---
00db10
 ChangeLog     |  6 ++++++
00db10
 NEWS          | 18 +++++++++---------
00db10
 elf/dl-load.c |  6 +++---
00db10
 3 files changed, 18 insertions(+), 12 deletions(-)
00db10
00db10
diff --git a/elf/dl-load.c b/elf/dl-load.c
00db10
index 73174aa..41b91fc 100644
00db10
--- a/elf/dl-load.c
00db10
+++ b/elf/dl-load.c
00db10
@@ -1889,9 +1889,9 @@ open_path (const char *name, size_t namelen, int mode,
00db10
       if (sps->malloced)
00db10
 	free (sps->dirs);
00db10
 
00db10
-      /* rtld_search_dirs is attribute_relro, therefore avoid writing
00db10
-	 into it.  */
00db10
-      if (sps != &rtld_search_dirs)
00db10
+      /* rtld_search_dirs and env_path_list are attribute_relro, therefore
00db10
+         avoid writing into it.  */
00db10
+      if (sps != &rtld_search_dirs && sps != &env_path_list)
00db10
 	sps->dirs = (void *) -1;
00db10
     }
00db10
 
00db10
-- 
00db10
1.8.3.1
00db10