Displaying 1 result from an estimated 1 matches for "dc90249".
2012 Jul 02
0
[klibc:master] [VAR] Sanitise environment variable names on entry
...e names
upon entry into the shell.
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: maximilian attems <max at stro.at>
---
usr/dash/var.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/usr/dash/var.c b/usr/dash/var.c
index 027beff..dc90249 100644
--- a/usr/dash/var.c
+++ b/usr/dash/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);
}
}