diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2016-03-25 23:30:06 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2016-03-25 23:30:06 +0000 |
commit | 0f0c3a0e4ad52c5013c170a0398c7b2d88df7983 (patch) | |
tree | 31c45d42ace7625b5d02c7fe6d6df59e8f756aff /www/seamonkey | |
parent | 49477413c015ce180bd50683d25a542bb3db7df1 (diff) | |
download | ports-0f0c3a0e4ad52c5013c170a0398c7b2d88df7983.tar.gz ports-0f0c3a0e4ad52c5013c170a0398c7b2d88df7983.zip |
gecko: fix an unlikely race with environ(7)
MFH: 2016Q1
Notes
Notes:
svn path=/head/; revision=411909
Diffstat (limited to 'www/seamonkey')
-rw-r--r-- | www/seamonkey/Makefile | 2 | ||||
-rw-r--r-- | www/seamonkey/files/patch-bug1233275 | 40 |
2 files changed, 41 insertions, 1 deletions
diff --git a/www/seamonkey/Makefile b/www/seamonkey/Makefile index 5e59063ca300..2e7ba4a76249 100644 --- a/www/seamonkey/Makefile +++ b/www/seamonkey/Makefile @@ -4,7 +4,7 @@ PORTNAME= seamonkey DISTVERSION= 2.39 MOZILLA_VER= 42 # above + 3 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES?= www mail news editors irc ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source diff --git a/www/seamonkey/files/patch-bug1233275 b/www/seamonkey/files/patch-bug1233275 new file mode 100644 index 000000000000..949558662729 --- /dev/null +++ b/www/seamonkey/files/patch-bug1233275 @@ -0,0 +1,40 @@ +# Copy environment for IPC using NSPR to avoid race + +diff --git a/ipc/chromium/src/base/process_util_bsd.cc b/ipc/chromium/src/base/process_util_bsd.cc +--- mozilla/ipc/chromium/src/base/process_util_bsd.cc ++++ mozilla/ipc/chromium/src/base/process_util_bsd.cc +@@ -13,6 +13,7 @@ + + #include <string> + ++#include "nspr.h" + #include "base/eintr_wrapper.h" + #include "base/file_util.h" + #include "base/logging.h" +@@ -48,7 +49,6 @@ + + #ifdef HAVE_POSIX_SPAWN + #include <spawn.h> +-extern "C" char **environ __dso_public; + #endif + + namespace { +@@ -114,6 +114,7 @@ bool LaunchApp(const std::vector<std::st + // Existing variables are overwritten by env_vars_to_set. + int pos = 0; + environment_map combined_env_vars = env_vars_to_set; ++ char **environ = PR_DuplicateEnvironment(); + while(environ[pos] != NULL) { + std::string varString = environ[pos]; + std::string varName = varString.substr(0, varString.find_first_of('=')); +@@ -121,8 +122,9 @@ bool LaunchApp(const std::vector<std::st + if (combined_env_vars.find(varName) == combined_env_vars.end()) { + combined_env_vars[varName] = varValue; + } +- pos++; ++ PR_Free(environ[pos++]); + } ++ PR_Free(environ); + int varsLen = combined_env_vars.size() + 1; + + char** vars = new char*[varsLen]; |