Fix a crash in Fancy plugin if one of the MIME parts has no Content-ID
authorAndrej Kacian <ticho@claws-mail.org>
Wed, 3 Jul 2019 09:19:48 +0000 (11:19 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Wed, 3 Jul 2019 09:19:48 +0000 (11:19 +0200)
src/plugins/fancy/fancy_viewer.c

index c84eeae..bc2a817 100644 (file)
@@ -430,7 +430,7 @@ static void resource_request_starting_cb(WebKitWebView              *view,
        if ((!g_ascii_strncasecmp(uri, "cid:", 4)) || (!g_ascii_strncasecmp(uri, "mid:", 4))) {
                image = g_strconcat("<", uri + 4, ">", NULL);
                while ((partinfo = procmime_mimeinfo_next(partinfo)) != NULL) {
-                       if (!g_ascii_strcasecmp(image, partinfo->id)) {
+                       if (partinfo->id && !g_ascii_strcasecmp(image, partinfo->id)) {
                                filename = procmime_get_tmp_file_name(partinfo);
                                if (!filename) {
                                        g_free(image);