From d6e0e6e9879c144f5d374fca0c015fd6208fc27e Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Tue, 11 Jul 2006 18:53:41 +0200 Subject: several changes, new stuff --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util.c') 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); } -- cgit v1.2.3-13-gbd6f