[PATCH] Ensure convert_mime_object does not return NULL
Guido Berhoerster <[email protected]> Sat, 25 Jul 2015 15:44:17 +0200
| Newsgroups | gmane.network.slrn.user |
|---|---|
| Message-ID | <20150725134416.GB21857@hal> |
In case the message is an empty string charset_convert_string will
return NULL which then leads to problems later.
---
macros/mime.sl | 3 +++
1 file changed, 3 insertions(+)
diff --git a/macros/mime.sl b/macros/mime.sl
index 24902cd..3d58547 100644
--- a/macros/mime.sl
+++ b/macros/mime.sl
@@ -348,6 +348,9 @@ private define format_type (type, width)
private define convert_mime_object (obj)
{
variable str = obj.message;
+ if (str == "")
+ return str;
+
if (obj.encoding == "base64")
str = decode_base64_string (str);
else if (obj.encoding == "quoted-printable")
--
2.1.4
------------------------------------------------------------------------------