void-packages/srcpkgs/slim/patches/fix-array-overflow.patch

12 lines
403 B
Diff
Raw Normal View History

2012-12-17 16:09:22 +01:00
--- 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;