summaryrefslogtreecommitdiffstats
path: root/kwin
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-15 02:26:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-15 02:26:04 +0000
commit458b7cead4a2988204b0d9700a0ffc2fd6140ebf (patch)
treea4c3e92b115ef54551d02d51d20158886e0c0eb4 /kwin
parenta382b3ab3160bc265983c538cb235eb51b87a4c5 (diff)
downloadtdebase-458b7cead4a2988204b0d9700a0ffc2fd6140ebf.tar.gz
tdebase-458b7cead4a2988204b0d9700a0ffc2fd6140ebf.zip
Add kdmtsak program
Fix possible kompmgr segfault under rare circumstances git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1253695 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin')
-rw-r--r--kwin/kompmgr/kompmgr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kwin/kompmgr/kompmgr.c b/kwin/kompmgr/kompmgr.c
index 3bb0a856a..decfb6853 100644
--- a/kwin/kompmgr/kompmgr.c
+++ b/kwin/kompmgr/kompmgr.c
@@ -389,7 +389,8 @@ void delete_pid_file()
printf("kompmgr lost connection to X server, restarting...\n\r"); fflush(stdout);
sleep(1);
char me[2048];
- readlink("/proc/self/exe", me, sizeof(me));
+ int chars = readlink("/proc/self/exe", me, sizeof(me));
+ me[chars] = 0;
me[2047] = 0;
execl(me, NULL);
}