aboutsummaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-11 18:53:41 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-11 18:53:41 +0200
commitd6e0e6e9879c144f5d374fca0c015fd6208fc27e (patch)
tree997db1276dc89c44361a56d80a66fb3722f8f2fe /util.c
parentb1669b5c48f71c9a7a919dbf09a1af527c62f69a (diff)
several changes, new stuff
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 76ba5ab..9da8f52 100644
--- a/util.c
+++ b/util.c
@@ -134,7 +134,7 @@ pipe_spawn(char *buf, unsigned int len, Display *dpy, char *argv[])
n += l;
}
close(pfd[0]);
- buf[n - 1] = 0;
+ buf[n < len ? n : len - 1] = 0;
}
wait(0);
}