talons

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

commit fe04873dd3b27991f984c7c1292a6a49847d5b19
parent c8cb6c4ce1f6b9ea2838c8288a3f32923d1d7f6e
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 @@ -475,8 +475,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;