summaryrefslogtreecommitdiff
path: root/testing/slim/fix-glibc-segfault-1.3.4.patch
blob: b035f8a7853675ed593940cf88d0db6ae4483a92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
Index: app.cpp
===================================================================
--- app.cpp	(revision 223)
+++ app.cpp	(working copy)
@@ -593,7 +593,7 @@
 
         n++;
 
-        child_env = static_cast<char**>(malloc(sizeof(char*)*n));
+        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;