From 758351abc533c25eada4d223c830d4051ee94e2c Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Sat, 6 Aug 2016 19:09:49 +0200 Subject: rfc2045: the (CR)LF before the boundary belongs to the boundary --- rfc2045.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'rfc2045.c') diff --git a/rfc2045.c b/rfc2045.c index 14e222a..9ee4e85 100644 --- a/rfc2045.c +++ b/rfc2045.c @@ -162,6 +162,11 @@ blaze822_multipart(struct message *msg, struct message **imsg) if (!nextpart) return 0; // XXX error condition + if (*(nextpart-1) == '\n') + nextpart--; + if (*(nextpart-1) == '\r') + nextpart--; + *imsg = blaze822_mem(part, nextpart-part); return 1; -- cgit 1.4.1