From 9317ea653afc26402387cac67042f9890af6add2 Mon Sep 17 00:00:00 2001 From: Bram Date: Thu, 18 Apr 2013 16:50:49 +0200 Subject: Fix segmentation fault when LD_LIBRARY_PATH contains only non-existings paths --- elf/dl-load.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'elf') 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; } -- cgit v1.1