diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-15 02:26:04 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-15 02:26:04 +0000 |
commit | 458b7cead4a2988204b0d9700a0ffc2fd6140ebf (patch) | |
tree | a4c3e92b115ef54551d02d51d20158886e0c0eb4 /kwin | |
parent | a382b3ab3160bc265983c538cb235eb51b87a4c5 (diff) | |
download | tdebase-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.c | 3 |
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); } |