summaryrefslogtreecommitdiff
path: root/www/firefox/files/patch-bug1369561
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--www/firefox/files/patch-bug136956166
1 files changed, 0 insertions, 66 deletions
diff --git a/www/firefox/files/patch-bug1369561 b/www/firefox/files/patch-bug1369561
deleted file mode 100644
index d3de0988830a..000000000000
--- a/www/firefox/files/patch-bug1369561
+++ /dev/null
@@ -1,66 +0,0 @@
-commit 4a1737e0c456
-Author: David Keeler <dkeeler@mozilla.com>
-Date: Fri Sep 15 14:47:54 2017 -0700
-
- Bug 1369561 - Address misc. SnprintfLiteral correctness nits. r=jld, r=froydnj, a=ritu
-
- --HG--
- extra : source : f5533b6cd09c35eef381e311940b5bd5231d3553
----
- security/sandbox/linux/SandboxUtil.cpp | 17 ++++++++++-------
- xpcom/base/nsSystemInfo.cpp | 2 +-
- 2 files changed, 11 insertions(+), 8 deletions(-)
-
-diff --git security/sandbox/linux/SandboxUtil.cpp security/sandbox/linux/SandboxUtil.cpp
-index ad6003ecaad5..999329882364 100644
---- security/sandbox/linux/SandboxUtil.cpp
-+++ security/sandbox/linux/SandboxUtil.cpp
-@@ -62,7 +62,6 @@ UnshareUserNamespace()
- uid_t uid = getuid();
- gid_t gid = getgid();
- char buf[80];
-- size_t len;
-
- if (syscall(__NR_unshare, CLONE_NEWUSER) != 0) {
- return false;
-@@ -84,17 +83,21 @@ UnshareUserNamespace()
- // current thread. However, CLONE_NEWUSER can be unshared only in a
- // single-threaded process, so those are equivalent if we reach this
- // point.
-- len = size_t(SprintfLiteral(buf, "%u %u 1\n", uid, uid));
-- MOZ_ASSERT(len < sizeof(buf));
-- if (!WriteStringToFile("/proc/self/uid_map", buf, len)) {
-+ int len = SprintfLiteral(buf, "%u %u 1\n", uid, uid);
-+ if (len >= int(sizeof(buf)) || len < 0) {
-+ return false;
-+ }
-+ if (!WriteStringToFile("/proc/self/uid_map", buf, size_t(len))) {
- MOZ_CRASH("Failed to write /proc/self/uid_map");
- }
-
- Unused << WriteStringToFile("/proc/self/setgroups", "deny", 4);
-
-- len = size_t(SprintfLiteral(buf, "%u %u 1\n", gid, gid));
-- MOZ_ASSERT(len < sizeof(buf));
-- if (!WriteStringToFile("/proc/self/gid_map", buf, len)) {
-+ len = SprintfLiteral(buf, "%u %u 1\n", gid, gid);
-+ if (len >= int(sizeof(buf)) || len < 0) {
-+ return false;
-+ }
-+ if (!WriteStringToFile("/proc/self/gid_map", buf, size_t(len))) {
- MOZ_CRASH("Failed to write /proc/self/gid_map");
- }
- return true;
-diff --git xpcom/base/nsSystemInfo.cpp xpcom/base/nsSystemInfo.cpp
-index e5a7fe97be03..782dc9abf37d 100644
---- xpcom/base/nsSystemInfo.cpp
-+++ xpcom/base/nsSystemInfo.cpp
-@@ -706,7 +706,7 @@ nsSystemInfo::Init()
- }
-
- nsAutoCString secondaryLibrary;
-- if (gtkver_len > 0) {
-+ if (gtkver_len > 0 && gtkver_len < int(sizeof(gtkver))) {
- secondaryLibrary.Append(nsDependentCSubstring(gtkver, gtkver_len));
- }
-