From: Paul Date: Wed, 24 Apr 2013 09:19:48 +0000 (+0100) Subject: further fix to bug #2862, 'Segmentation fault when replying to a message where the... X-Git-Tag: 3.9.1~13 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=3.9.0-196-g06e09c8;hp=31d93a0fc959abdad1733e393e6ef65302958751 further fix to bug #2862, 'Segmentation fault when replying to a message where the "code conversion" fails' --- diff --git a/src/procmime.c b/src/procmime.c index 579674126..2fe223b9f 100644 --- a/src/procmime.c +++ b/src/procmime.c @@ -798,17 +798,16 @@ gboolean procmime_scan_text_content(MimeInfo *mimeinfo, } else if (mimeinfo->type == MIMETYPE_TEXT) { while (SC_FGETS(buf, sizeof(buf), tmpfp) != NULL) { str = conv_codeset_strdup(buf, src_codeset, CS_UTF_8); + if (!str) + str = conv_codeset_strdup(buf, conv_get_locale_charset_str(), CS_UTF_8); if (str) { - if ((scan_ret = scan_callback(str, cb_data)) == TRUE) { - g_free(str); - break; - } - g_free(str); - } else { + if ((scan_ret = scan_callback(str, cb_data)) == TRUE) { + g_free(str); + break; + } + g_free(str); + } else conv_fail = TRUE; - if ((scan_ret = scan_callback(str, cb_data)) == TRUE) - break; - } } }