From 92210d0454a6c4a1c50ce070d4aac1342f8483d0 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 30 Mar 2019 08:40:07 +0000 Subject: [PATCH] Check for empty messages --- app/src/main/java/eu/faircode/email/MessageHelper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index a1940dfdfb..049328375f 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -505,6 +505,8 @@ public class MessageHelper { Integer getSize() throws MessagingException { int size = imessage.getSize(); + if (size == 0) + throw new MessagingException("Message empty"); return (size < 0 ? null : size); }