X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/b02a191a4c725fb987c56dc41b2a81fbd6bff44c..8ae9c34707bcd3d06d9856bc71003cc306b9c912:/uip/mhfixmsg.c diff --git a/uip/mhfixmsg.c b/uip/mhfixmsg.c index 5385b9ec..4d5083c6 100644 --- a/uip/mhfixmsg.c +++ b/uip/mhfixmsg.c @@ -484,9 +484,11 @@ fix_boundary (CT *ct, int *message_mods) { if ((fixed = m_mktemp2 (NULL, invo_name, NULL, &(*ct)->c_fp))) { if (replace_boundary (*ct, fixed, part_boundary) == OK) { char *filename = add ((*ct)->c_file, NULL); + CT fixed_ct; free_content (*ct); - if ((*ct = parse_mime (fixed))) { + if ((fixed_ct = parse_mime (fixed))) { + *ct = fixed_ct; (*ct)->c_unlink = 1; ++*message_mods; @@ -494,6 +496,9 @@ fix_boundary (CT *ct, int *message_mods) { report (NULL, NULL, filename, "fix multipart boundary"); } + } else { + advise (NULL, "unable to parse fixed part"); + status = NOTOK; } free (filename); } else { @@ -670,7 +675,9 @@ replace_boundary (CT ct, char *file, char *boundary) { case BODY: fputs ("\n", fpout); /* buf will have a terminating NULL, skip it. */ - fwrite (buf, 1, bufsz-1, fpout); + if ((int) fwrite (buf, 1, bufsz-1, fpout) < bufsz-1) { + advise (file, "fwrite"); + } continue; case FILEEOF: