rfc2045: blaze822_multipart: parse rest when boundary is missing

Either the mail got truncated or was wrongly generated, try to go on
by taking the remains of the buffer as part.
pull/196/head
Leah Neukirchen 3 years ago
parent bc021c53b6
commit f95439a988

@ -182,8 +182,8 @@ blaze822_multipart(struct message *msg, struct message **imsg)
char *nextpart = mymemmemnl(part, msg->bodyend - part, mboundary, boundarylen);
if (!nextpart)
return 0; // XXX error condition
if (nextpart == part) // invalid empty MIME part
nextpart = msg->bodyend; // no boundary found, take all
else if (nextpart == part) // invalid empty MIME part
return 0; // XXX error condition
if (*(nextpart-1) == '\n')

Loading…
Cancel
Save