about summary refs log tree commit diff
path: root/mshow.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2018-11-14 15:04:36 +0100
committerLeah Neukirchen <leah@vuxu.org>2018-11-14 15:04:36 +0100
commit2069a0e913167447d84429d09940897b2ffce07e (patch)
tree0dc4204ec5f5550798ff693c1d70e78ce65f3135 /mshow.c
parent41098c38510c75ba539dd14ba23410cbe381037b (diff)
downloadmblaze-2069a0e913167447d84429d09940897b2ffce07e.tar.gz
mblaze-2069a0e913167447d84429d09940897b2ffce07e.tar.xz
mblaze-2069a0e913167447d84429d09940897b2ffce07e.zip
mshow: choose_alternative: skip empty MIME parts.
Diffstat (limited to 'mshow.c')
-rw-r--r--mshow.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mshow.c b/mshow.c
index d4b1ba8..fb35330 100644
--- a/mshow.c
+++ b/mshow.c
@@ -326,6 +326,10 @@ choose_alternative(struct message *msg, int depth)
 	struct message *imsg = 0;
 	while (blaze822_multipart(msg, &imsg)) {
 		m++;
+
+		if (blaze822_bodylen(imsg) == 0)
+			continue;
+
 		char *ict = blaze822_hdr(imsg, "content-type");
 		if (!ict)
 			ict = fallback_ct;