about summary refs log tree commit diff
path: root/rfc2045.c
diff options
context:
space:
mode:
Diffstat (limited to 'rfc2045.c')
-rw-r--r--rfc2045.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rfc2045.c b/rfc2045.c
index 807a0c3..2a6376b 100644
--- a/rfc2045.c
+++ b/rfc2045.c
@@ -161,6 +161,8 @@ blaze822_multipart(struct message *msg, struct message **imsg)
 	char *nextpart = mymemmem(part, msg->bodyend - part, mboundary, boundarylen);
 	if (!nextpart)
 		return 0;   // XXX error condition
+	if (nextpart == part)  // invalid empty MIME part
+		return 0;   // XXX error condition
 
 	if (*(nextpart-1) == '\n')
 		nextpart--;