From b67c1bacd0fc27c26cc3ec19bd2c9ded19cecd08 Mon Sep 17 00:00:00 2001 From: tedbo Date: Thu, 20 Jan 2011 20:44:44 -0800 Subject: [PATCH] Fix bug in linker environment variable lookup. The linker_env_get() method that is used to match an environment variable was failing due to an incorrect equality check. This was introduced in git change be5755969d70668bbab0e0c0ed75ebd867189723. The bug was causing the linker to ignore environment variables such as LD_LIBRARY_PATH. This issue also affects the linker_env_secure() path that removes unsafe environment variables, since it would not match any in the unsecure variable list. Change-Id: I14228df9252010e9fb4c1862bed5735f23e97aec --- linker/linker_environ.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linker/linker_environ.c b/linker/linker_environ.c index 6c5b57185..b71dd8069 100644 --- a/linker/linker_environ.c +++ b/linker/linker_environ.c @@ -110,7 +110,7 @@ env_match(char* envstr, const char* name) while (envstr[cnt] == name[cnt] && name[cnt] != '\0') cnt++; - if (name[cnt] != '\0' && envstr[cnt] == '=') + if (name[cnt] == '\0' && envstr[cnt] == '=') return envstr + cnt + 1; return NULL;