From 570c6374806d0f1ec59cf7a72543efe6b5b637be Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 15 Nov 2013 09:06:57 +0100 Subject: Fix/mute issues found by Coverity scan This makes the code free of Coverity scan issues. It is sometimes quite pedantic and expects/suggests some coding habits, thus certain changes may look weird, but for a good thing, I hope. The code is also tagged with Coverity scan suppressions, to keep the code as is and hide the warning too. Also note that Coverity treats g_return_if_fail(), g_assert() and similar macros as unreliable, and it's true these can be disabled during the compile time, thus it brings in other set of 'weird' changes. --- plugins/mailing-list-actions/mailing-list-actions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/mailing-list-actions/mailing-list-actions.c') diff --git a/plugins/mailing-list-actions/mailing-list-actions.c b/plugins/mailing-list-actions/mailing-list-actions.c index d9466013c2..35a379c771 100644 --- a/plugins/mailing-list-actions/mailing-list-actions.c +++ b/plugins/mailing-list-actions/mailing-list-actions.c @@ -229,7 +229,7 @@ emla_list_action_cb (CamelFolder *folder, /* get URL portion */ url = g_strndup (headerpos, end - headerpos); - if (strncmp (url, "mailto:", 6) == 0) { + if (url && strncmp (url, "mailto:", 6) == 0) { if (emla_action_headers[t].interactive) send_message_response = GTK_RESPONSE_NO; else @@ -253,7 +253,7 @@ emla_list_action_cb (CamelFolder *folder, } goto exit; - } else { + } else if (url && *url) { e_show_uri (window, url); goto exit; } -- cgit v1.2.3