https://bugs.kde.org/show_bug.cgi?id=463764

--- Comment #1 from kdenlive-...@nest.cx ---
I believe this patch is sufficient to fix the problem. It both makes `key` not
be used after it was destructed and fixes the user issue:

Resolve use-after-free in thumbnailcache

Index: src/utils/thumbnailcache.cpp
--- src/utils/thumbnailcache.cpp.orig
+++ src/utils/thumbnailcache.cpp
@@ -33,8 +33,8 @@ class ThumbnailCache::Cache_t (public)
         }
         auto it = m_cache.at(key);
         m_currentCost -= (*it).second.second;
-        m_data.erase(it);
         m_cache.erase(key);
+        m_data.erase(it);
     }

     void insert(const QString &key, const QImage &img, int cost)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to