diff options
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/var.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index d1e84c9..8686332 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-02-25 Herbert Xu <herbert@gondor.apana.org.au> + + * Sanitise environment variable names on entry. + 2011-08-17 David S. Miller <davem@davemloft.net> * Allow building without LINEO support. diff --git a/src/var.c b/src/var.c index 027beff..dc90249 100644 --- a/src/var.c +++ b/src/var.c @@ -136,7 +136,8 @@ INIT { initvar(); for (envp = environ ; *envp ; envp++) { - if (strchr(*envp, '=')) { + p = endofname(*envp); + if (p != *envp && *p == '=') { setvareq(*envp, VEXPORT|VTEXTFIXED); } } |