summaryrefslogtreecommitdiffstats
path: root/linker/linker_environ.c
diff options
context:
space:
mode:
authortedbo <tedbo@google.com>2011-01-20 20:44:44 -0800
committertedbo <tedbo@google.com>2011-01-20 20:44:44 -0800
commitb3cdf7fef86eb17dba5640e9a1b158510326b9b7 (patch)
tree7ed182ecc915e07d317f0890fc890e4c41b28626 /linker/linker_environ.c
parent441d7608b76613c3fb99867eed97277c237eb381 (diff)
downloadbionic-b3cdf7fef86eb17dba5640e9a1b158510326b9b7.zip
bionic-b3cdf7fef86eb17dba5640e9a1b158510326b9b7.tar.gz
bionic-b3cdf7fef86eb17dba5640e9a1b158510326b9b7.tar.bz2
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: I169024de4a005321e768accd38246fc1d717271b
Diffstat (limited to 'linker/linker_environ.c')
-rw-r--r--linker/linker_environ.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linker/linker_environ.c b/linker/linker_environ.c
index 6c5b571..b71dd80 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;