talons

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

commit 5ff65a47686854b082fca1fbb7b64e11e9a47e3f
parent 08293cc6790f8e465383caf9fe9e07cdadaedbe1
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Wed,  3 Jul 2019 11:02:20 +0200

Fix a crash in litehtml plugin if one of the MIME parts has no Content-ID

Diffstat:
Msrc/plugins/litehtml_viewer/lh_widget.cpp | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/plugins/litehtml_viewer/lh_widget.cpp b/src/plugins/litehtml_viewer/lh_widget.cpp @@ -447,8 +447,9 @@ GdkPixbuf *lh_widget::get_local_image(const litehtml::tstring url) const size_t len = strlen(name); /* p->id is in format "<partname>" */ - if (!strncasecmp(name, p->id + 1, len) && + if (p->id != NULL && strlen(p->id) >= len + 2 && + !strncasecmp(name, p->id + 1, len) && *(p->id + len + 1) == '>') { GInputStream *stream; GError *error = NULL;