From patchwork Mon Oct 13 00:07:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allan McRae X-Patchwork-Id: 3210 Received: (qmail 7789 invoked by alias); 13 Oct 2014 00:07:47 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 7775 invoked by uid 89); 13 Oct 2014 00:07:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: nymeria.archlinux.org From: Allan McRae To: libc-alpha@sourceware.org Subject: [PATCH] * elf/dl-load.c (open_path): avoid writing to 'env_path_list' when none of the search directories exist. Date: Mon, 13 Oct 2014 10:07:26 +1000 Message-Id: <1413158846-7075-1-git-send-email-allan@archlinux.org> From: Bram --- 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 [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; }