summaryrefslogtreecommitdiffstats
path: root/system/slim/patches/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/slim/patches/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch')
-rw-r--r--system/slim/patches/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/system/slim/patches/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch b/system/slim/patches/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch
new file mode 100644
index 0000000000..b3787dd584
--- /dev/null
+++ b/system/slim/patches/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch
@@ -0,0 +1,15 @@
+--- a/app.cpp 2015-09-14 12:00:00.460481656 -0400
++++ b/app.cpp 2015-09-14 14:41:10.970536588 -0400
+@@ -606,9 +606,9 @@
+
+ n++;
+
+- child_env = static_cast<char**>(malloc(sizeof(char*)*n));
+- memcpy(child_env, old_env, sizeof(char*)*n+1);
+- child_env[n - 1] = StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie());
++ child_env = static_cast<char**>(malloc(sizeof(char*)*(n+1)));
++ memcpy(child_env, old_env, sizeof(char*)*n);
++ child_env[n-1] = StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie());
+ child_env[n] = NULL;
+ }
+ # endif /* USE_CONSOLEKIT */