Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2014-02-12 02:39:23 -0500
committerUwe Stieber2014-02-12 02:39:23 -0500
commit10af684d87d8aa2b86666e533d4217f816c502ef (patch)
treefed18bf645f950bf7b31522b4dca2f67eff770a4
parentcb01858e1bd99f8ac4c7f13a1663ebe42a8619dc (diff)
downloadorg.eclipse.tcf-10af684d87d8aa2b86666e533d4217f816c502ef.tar.gz
org.eclipse.tcf-10af684d87d8aa2b86666e533d4217f816c502ef.tar.xz
org.eclipse.tcf-10af684d87d8aa2b86666e533d4217f816c502ef.zip
Target Explorer: Filter out bad environment variable names leading to ERROR_INVALID_PARAMETER on CreateProcess on Windows
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java
index f9f989a44..5d92ca9ae 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Env.java
@@ -86,6 +86,10 @@ public class Env {
Assert.isNotNull(candidate);
name = candidate;
}
+ // Filter out environment variables with bad names
+ if ("".equals(name.trim()) || name.contains("=") || name.contains(":")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ continue;
+ }
}
// If the variable has no value, ignore the variable
if (parts.length < 2) continue;

Back to the top