about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--rfc2045.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/rfc2045.c b/rfc2045.c
index eb23d0c..8f913a1 100644
--- a/rfc2045.c
+++ b/rfc2045.c
@@ -18,8 +18,11 @@ blaze822_check_mime(struct message *msg)
 int
 blaze822_mime_body(struct message *msg, char **cto, char **bodyo, size_t *bodyleno)
 {
-	if (!msg->body || !msg->bodyend)
+	if (!msg->body || !msg->bodyend) {
+		*bodyo = 0;
+		*bodyleno = 0;
 		return -1;
+        }
 
 	char *ct = blaze822_hdr(msg, "content-type");
 	char *cte = blaze822_hdr(msg, "content-transfer-encoding");