talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 386c838845d6a44891555fee3d230889bf8126df
parent f7c10678ad9b7f4470b75618fcd34f5964d40724
Author: Ricardo Mones <ricardo@mones.org>
Date:   Mon, 11 Jun 2018 12:31:29 +0200

Fix CID#1436912: Dereferencing null pointer "msginfo->folder"

Diffstat:
Msrc/messageview.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/messageview.c b/src/messageview.c @@ -1537,8 +1537,8 @@ gint messageview_show(MessageView *messageview, MsgInfo *msginfo, } messageview_find_part_depth_first(&context, MIMETYPE_TEXT, "html"); if (context.found && - (msginfo->folder->prefs->promote_html_part == HTML_PROMOTE_ALWAYS || - (msginfo->folder->prefs->promote_html_part == HTML_PROMOTE_DEFAULT && + ((msginfo->folder && msginfo->folder->prefs->promote_html_part == HTML_PROMOTE_ALWAYS) || + ((msginfo->folder && msginfo->folder->prefs->promote_html_part == HTML_PROMOTE_DEFAULT) && prefs_common.promote_html_part))) { /* html found */ mimeinfo = context.found; if (messageview_try_select_mimeinfo(messageview, msginfo, mimeinfo))