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

Dmitry Kazakov <dimul...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/grap
                   |                            |hics/krita/commit/a06de5df1
                   |                            |35c14d8335b0589d0099e85d94f
                   |                            |316d
             Status|CONFIRMED                   |RESOLVED

--- Comment #6 from Dmitry Kazakov <dimul...@gmail.com> ---
Git commit a06de5df135c14d8335b0589d0099e85d94f316d by Dmitry Kazakov.
Committed on 17/12/2021 at 09:50.
Pushed by dkazakov into branch 'master'.

Fix memory corruptions (and crashes) in File Layers

1) When we copy the image on saving, we will call KisFileLayer::setImage(),
   which transitively calls to KisFileLayer::slotLoadingFinished(), which
   could convert the image pointer to the strong one. That could cause a
   crash, because the image was not constructed yet, therefore its
   refernce counter was still zero.

2) When we copy the layer into the clipboard and destroy its (temporary)
   image, we should clear all the references to this layer, such as
   KisNode::image() and KisNode::graphListener(). Otherwise it could
   cause a memory corruption, when the layer in the clipboard could
   call setDirty() on the external image change.
Related: bug 446209

M  +3    -0    libs/image/kis_image.cc
M  +3    -1    libs/ui/flake/kis_shape_layer.cc
M  +27   -2    libs/ui/kis_file_layer.cpp

https://invent.kde.org/graphics/krita/commit/a06de5df135c14d8335b0589d0099e85d94f316d

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

Reply via email to