aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorBram <bug_rh@spam.wizbit.be>2013-04-18 16:50:49 +0200
committerAllan McRae <allan@archlinux.org>2015-01-25 15:12:10 +1000
commit9317ea653afc26402387cac67042f9890af6add2 (patch)
treebaff3493a2fc6472db20b8cd5fad7c2612e81b01 /elf
parentbea58013607c6507108bc73744a0bf63d735f259 (diff)
downloadglibc-9317ea653afc26402387cac67042f9890af6add2.zip
glibc-9317ea653afc26402387cac67042f9890af6add2.tar.gz
glibc-9317ea653afc26402387cac67042f9890af6add2.tar.bz2
Fix segmentation fault when LD_LIBRARY_PATH contains only non-existings paths
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-load.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 73174aa..41b91fc 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1889,9 +1889,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;
}