aboutsummaryrefslogtreecommitdiff
path: root/mail/thunderbird
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2016-03-29 16:05:47 +0000
committerJan Beich <jbeich@FreeBSD.org>2016-03-29 16:05:47 +0000
commit2e3748d1e04b442e82ba787fb3ac82a44847bf3a (patch)
tree45644c2e3798c9de7ce6b8cd8f48747f1fb7eb94 /mail/thunderbird
parentfe4dc7abae7f736ec38814200b4993c61032fbb0 (diff)
downloadports-2e3748d1e04b442e82ba787fb3ac82a44847bf3a.tar.gz
ports-2e3748d1e04b442e82ba787fb3ac82a44847bf3a.zip
MFH: r411909
gecko: fix an unlikely race with environ(7) Approved by: ports-secteam (feld)
Notes
Notes: svn path=/branches/2016Q1/; revision=412123
Diffstat (limited to 'mail/thunderbird')
-rw-r--r--mail/thunderbird/Makefile1
-rw-r--r--mail/thunderbird/files/patch-bug123327540
2 files changed, 41 insertions, 0 deletions
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile
index 7ba3f9eedbf3..6d2ae20490be 100644
--- a/mail/thunderbird/Makefile
+++ b/mail/thunderbird/Makefile
@@ -3,6 +3,7 @@
PORTNAME= thunderbird
DISTVERSION= 38.7.0
+PORTREVISION= 1
CATEGORIES= mail news net-im ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
diff --git a/mail/thunderbird/files/patch-bug1233275 b/mail/thunderbird/files/patch-bug1233275
new file mode 100644
index 000000000000..949558662729
--- /dev/null
+++ b/mail/thunderbird/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];