aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-06-28 12:25:09 -0400
committerNick Mathewson <nickm@torproject.org>2017-06-28 12:25:09 -0400
commit01404d7c52a7c9b5756a73d662811da70d7a8378 (patch)
tree6f94c43d91113fa04b1483df438fa85422ecc82e /src/common
parenta794fb7609a9f68af7c21f4b9dd671a0774d4d4c (diff)
parentc239b2fc9c19d7c146888b534a8b51a88df03326 (diff)
downloadtor-01404d7c52a7c9b5756a73d662811da70d7a8378.tar.gz
tor-01404d7c52a7c9b5756a73d662811da70d7a8378.zip
Merge branch 'maint-0.3.1'
Diffstat (limited to 'src/common')
-rw-r--r--src/common/sandbox.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index aae0705af4..52caa4fcc6 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -19,8 +19,14 @@
#define _LARGEFILE64_SOURCE
#endif
-/** Malloc mprotect limit in bytes. */
-#define MALLOC_MP_LIM (16*1024*1024)
+/** Malloc mprotect limit in bytes.
+ *
+ * 28/06/2017: This value was increased from 16 MB to 20 MB after we introduced
+ * LZMA support in Tor (0.3.1.1-alpha). We limit our LZMA coder to 16 MB, but
+ * liblzma have a small overhead that we need to compensate for to avoid being
+ * killed by the sandbox.
+ */
+#define MALLOC_MP_LIM (20*1024*1024)
#include <stdio.h>
#include <string.h>