X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhlsbr.c;h=6bfbade7f946c3669cd122988ddea2a85e4b575e;hb=9ac724c1df34e9dd56e2e35566b0cf81a491e8e6;hp=1446c2a78d721f2629de65ad94f4b4fbb9658690;hpb=3e151103c954aad7871a197b438b8d79d557e07e;p=mmh diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 1446c2a..6bfbade 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -16,6 +16,8 @@ #include #include #include +#include +#include /* * MAJOR BUG: @@ -1094,7 +1096,7 @@ mcomp_format (struct mcomp *c1, struct mcomp *c2) if ((c1->c_flags & FACEDFLT) && c2->c_face == NULL) { char *h, *o; if ((h = mp->m_host) == NULL) - h = LocalName (); + h = LocalName (0); if ((o = OfficialName (h))) h = o; c2->c_face = concat ("address ", h, " ", mp->m_mbox, @@ -1501,7 +1503,7 @@ face_format (struct mcomp *c1) if ((mp = getm (cp, NULL, 0, AD_NAME, NULL))) { char *h, *o; if ((h = mp->m_host) == NULL) - h = LocalName (); + h = LocalName (0); if ((o = OfficialName (h))) h = o; c1->c_face = concat ("address ", h, " ", mp->m_mbox, NULL); @@ -1949,7 +1951,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); }