summaryrefslogtreecommitdiffstats
path: root/kwin/kompmgr/kompmgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'kwin/kompmgr/kompmgr.c')
-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);
}