summaryrefslogtreecommitdiff
path: root/source/xap/pan/patches/0002-50f6c43a698dcc0ba6b490c086a73eeedbdd8a80.patch
diff options
context:
space:
mode:
Diffstat (limited to 'source/xap/pan/patches/0002-50f6c43a698dcc0ba6b490c086a73eeedbdd8a80.patch')
-rw-r--r--source/xap/pan/patches/0002-50f6c43a698dcc0ba6b490c086a73eeedbdd8a80.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/source/xap/pan/patches/0002-50f6c43a698dcc0ba6b490c086a73eeedbdd8a80.patch b/source/xap/pan/patches/0002-50f6c43a698dcc0ba6b490c086a73eeedbdd8a80.patch
new file mode 100644
index 00000000..02ed1b6e
--- /dev/null
+++ b/source/xap/pan/patches/0002-50f6c43a698dcc0ba6b490c086a73eeedbdd8a80.patch
@@ -0,0 +1,31 @@
+From 50f6c43a698dcc0ba6b490c086a73eeedbdd8a80 Mon Sep 17 00:00:00 2001
+From: Detlef Graef <detlef.graef@yahoo.de>
+Date: Fri, 19 Apr 2019 18:43:21 +0200
+Subject: [PATCH] Attempt to fix issue #77; segfault when build with gmime-3
+
+---
+ pan/general/utf8-utils.cc | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/pan/general/utf8-utils.cc b/pan/general/utf8-utils.cc
+index be79a13..58565cf 100644
+--- a/pan/general/utf8-utils.cc
++++ b/pan/general/utf8-utils.cc
+@@ -135,13 +135,16 @@ pan :: header_to_utf8 (const StringView & header,
+ const char * fallback_charset1,
+ const char * fallback_charset2)
+ {
++
++ GMimeParserOptions *gmpo = g_mime_parser_options_new();
+ std::string s = content_to_utf8 (header, fallback_charset1, fallback_charset2);
+ if (header.strstr ("=?")) {
+- char * decoded (g_mime_utils_header_decode_text (NULL, s.c_str()));
++ char * decoded (g_mime_utils_header_decode_text (gmpo, s.c_str()));
+ s = clean_utf8 (decoded);
+ g_free (decoded);
+ }
+ return s;
++ g_mime_parser_options_free (gmpo);
+ }
+
+ #else