[evolution] Critical warning could be printed when replying on message with inline images



commit 43afbfdea43203687c8ead057ffd7fdc71bc1d5d
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Aug 31 15:41:18 2016 +0200

    Critical warning could be printed when replying on message with inline images
    
    Name returned by camel_mime_part_get_filename() can be empty, count with it.

 modules/webkit-editor/e-webkit-editor.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/modules/webkit-editor/e-webkit-editor.c b/modules/webkit-editor/e-webkit-editor.c
index 4428db6..0603ed9 100644
--- a/modules/webkit-editor/e-webkit-editor.c
+++ b/modules/webkit-editor/e-webkit-editor.c
@@ -1743,7 +1743,7 @@ webkit_editor_insert_image_from_mime_part (EContentEditor *editor,
 
        name = camel_mime_part_get_filename (part);
        /* Insert file name before new src */
-       src = g_strconcat (name, ";data:", mime_type, ";base64,", base64_encoded, NULL);
+       src = g_strconcat (name ? name : "", name ? ";data:" : "", mime_type, ";base64,", base64_encoded, 
NULL);
 
        cid = camel_mime_part_get_content_id (part);
        if (!cid) {
@@ -1755,7 +1755,7 @@ webkit_editor_insert_image_from_mime_part (EContentEditor *editor,
        e_util_invoke_g_dbus_proxy_call_with_error_check (
                wk_editor->priv->web_extension,
                "DOMAddNewInlineImageIntoList",
-               g_variant_new ("(tsss)", current_page_id (wk_editor), name, cid_uri, src),
+               g_variant_new ("(tsss)", current_page_id (wk_editor), name ? name : "", cid_uri, src),
                NULL);
 
        g_free (base64_encoded);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]