From aaf31d46368bcf63f7ae4b0019ef09d098f98491 Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Tue, 31 Jan 2012 13:20:40 -0500 Subject: [PATCH] Whoops, I need to make sure the buffer I pass to putcomp() is NULL-terminated. --- uip/mhlsbr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 1446c2a..a44413c 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -1949,7 +1949,8 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, FILE *fp) holder.c_text = buf; - while ((cc = read(fdoutput[0], buf, bufsz)) > 0) { + while ((cc = read(fdoutput[0], buf, bufsz - 1)) > 0) { + buf[cc] = '\0'; putcomp(c1, &holder, BODYCOMP); } -- 1.7.10.4