[tin-users] tin parse multipart/mixed complaint
Dennis Preiser
dennis at d--p.de
Sat May 2 09:11:47 CEST 2020
On Sat, May 02, 2020 at 05:29:20AM +0200, kevin shell wrote:
> When viewing multipart/mixed MIME messages
> with the last MIME part missing the ending boundary
> tin always complaint with
> "MIME parse error: Unexpected end of multipart/mixed article"
That is indeed annoying. I use the attached patch so that the error
message is only displayed during debugging.
Dennis
-------------- next part --------------
--- tin-2.4.5_orig/src/rfc2046.c 2019-11-20 14:40:26.000000000 +0100
+++ tin-2.4.5/src/rfc2046.c 2020-05-01 10:22:45.000000000 +0200
@@ -1250,8 +1250,11 @@ parse_multipart_article(
case M_HDR:
switch (bnd) {
- case BOUND_START: /* TODO: skip error message if not -DDEBUG? */
- error_message(2, _(txt_error_mime_start));
+ case BOUND_START:
+#ifdef DEBUG
+ if (debug)
+ error_message(2, _(txt_error_mime_start));
+#endif /* DEBUG */
continue;
case BOUND_NONE:
@@ -1465,8 +1468,10 @@ parse_rfc2045_article(
/* Strip off EOF condition if present */
if (ret & TIN_EOF) {
ret ^= TIN_EOF;
- /* TODO: skip error message if not -DDEBUG? */
- error_message(2, _(txt_error_mime_end), content_types[artinfo->hdr.ext->type], artinfo->hdr.ext->subtype);
+#ifdef DEBUG
+ if (debug)
+ error_message(2, _(txt_error_mime_end), content_types[artinfo->hdr.ext->type], artinfo->hdr.ext->subtype);
+#endif /* DEBUG */
if (ret != 0)
goto error;
} else
More information about the tin-users
mailing list