about summary refs log tree commit diff
path: root/rfc2045.c
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-08-06 19:09:49 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-08-06 19:09:49 +0200
commit758351abc533c25eada4d223c830d4051ee94e2c (patch)
tree351d8b165ff7bb21a685fcb1755c818eb18fee34 /rfc2045.c
parentcc8df261b2cf7d7867cb961b95bdabff5ec59a09 (diff)
downloadmblaze-758351abc533c25eada4d223c830d4051ee94e2c.tar.gz
mblaze-758351abc533c25eada4d223c830d4051ee94e2c.tar.xz
mblaze-758351abc533c25eada4d223c830d4051ee94e2c.zip
rfc2045: the (CR)LF before the boundary belongs to the boundary
Diffstat (limited to 'rfc2045.c')
-rw-r--r--rfc2045.c5
1 files changed, 5 insertions, 0 deletions
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;