diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2006-06-16 21:28:08 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2006-06-16 21:28:08 +0000 |
commit | 0c6e853af10c359b8e4ad0ebd62cce9731e7679a (patch) | |
tree | 7d09ac0a76c451d4ebbe6a574a1abf3292ba6ce3 /java/jdk15 | |
parent | . Increase the default stack size on amd64. (diff) |
. Filter out corrupt environment variables with no name.
Submitted by: Kurt Miller <kurt@intricatesoftware.com>
Sponsored by: The FreeBSD Foundation
Notes
Notes:
svn path=/head/; revision=165601
Diffstat (limited to 'java/jdk15')
-rw-r--r-- | java/jdk15/files/patch-j2se::lang::ProcessEnvironment_md.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/java/jdk15/files/patch-j2se::lang::ProcessEnvironment_md.c b/java/jdk15/files/patch-j2se::lang::ProcessEnvironment_md.c new file mode 100644 index 000000000000..64f8f4ebd6c4 --- /dev/null +++ b/java/jdk15/files/patch-j2se::lang::ProcessEnvironment_md.c @@ -0,0 +1,22 @@ +$FreeBSD$ + +--- ../../j2se/src/solaris/native/java/lang/ProcessEnvironment_md.c.orig Tue Oct 19 15:02:09 2004 ++++ ../../j2se/src/solaris/native/java/lang/ProcessEnvironment_md.c Thu Jun 15 17:58:34 2006 +@@ -32,7 +32,7 @@ + + for (i = 0; environ[i]; i++) { + /* Ignore corrupted environment variables */ +- if (strchr(environ[i], '=') != NULL) ++ if (strchr(environ[i], '=') != NULL && *environ[i] != '=') + count++; + } + +@@ -43,7 +43,7 @@ + jsize len = strlen(environ[i]); + const char * varEnd = strchr(environ[i], '='); + /* Ignore corrupted environment variables */ +- if (varEnd != NULL) { ++ if (varEnd != NULL && varEnd != environ[i]) { + jbyteArray var, val; + const char * valBeg = varEnd + 1; + jsize varLength = varEnd - environ[i]; |