[Commits] [SCM] claws branch, master, updated. 3.18.0-33-g6b6657a9f

jonathan at claws-mail.org jonathan at claws-mail.org
Sun Aug 8 07:24:01 CEST 2021


The branch, master has been updated
       via  6b6657a9f17838ae96f4992f3aa2b68782eb4431 (commit)
      from  51e51b47ccc08d7a97b661b66baa8d37cfde5440 (commit)

Summary of changes:
 src/plugins/litehtml_viewer/container_linux_images.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 6b6657a9f17838ae96f4992f3aa2b68782eb4431
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Sat Aug 7 21:32:28 2021 -0700

    Fix clearing local images from litehtml cache
    
    The cache clearing logic was double incrementing for cid: images, going
    into an infinite loop if a cid: image was the last one checked

diff --git a/src/plugins/litehtml_viewer/container_linux_images.cpp b/src/plugins/litehtml_viewer/container_linux_images.cpp
index 072192e47..6f749d14e 100644
--- a/src/plugins/litehtml_viewer/container_linux_images.cpp
+++ b/src/plugins/litehtml_viewer/container_linux_images.cpp
@@ -229,11 +229,13 @@ gint container_linux::clear_images(gsize desired_size)
 	lock_images_cache();
 
 	/* First, remove all local images - the ones with "cid:" URL. */
-	for (auto i = m_images.begin(); i != m_images.end(); ++i) {
+	for (auto i = m_images.begin(); i != m_images.end(); ) {
 		if (!strncmp(i->first.c_str(), "cid:", 4)) {
 			g_object_unref(i->second.first);
 			i = m_images.erase(i);
 			num++;
+		} else {
+			++i;
 		}
 	}
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list