sw/source/uibase/uiview/uivwimp.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit f7b14acbccc496aae0d7d07b3ba3ca1b35af2ae2
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Jul 2 11:19:39 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Jul 6 21:06:46 2021 +0200

    fix potential use-after-free in SwClipboardChangeListener
    
    we think we're seeing this in COOL
    
    Change-Id: I29a287b032158076a99a836d98113d1623ebef99
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118277
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    (cherry picked from commit 558dface96fbc5f487b16cfa1bf3c3ea20776331)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118431

diff --git a/sw/source/uibase/uiview/uivwimp.cxx 
b/sw/source/uibase/uiview/uivwimp.cxx
index b607ccf9b256..0173f3fdc5a4 100644
--- a/sw/source/uibase/uiview/uivwimp.cxx
+++ b/sw/source/uibase/uiview/uivwimp.cxx
@@ -287,6 +287,8 @@ SwClipboardChangeListener::~SwClipboardChangeListener()
 
 void SAL_CALL SwClipboardChangeListener::disposing( const EventObject& 
/*rEventObject*/ )
 {
+    SolarMutexGuard aGuard;
+    pView = nullptr; // so we don't touch the view if changedContents somehow 
fires afterwards
 }
 
 void SAL_CALL SwClipboardChangeListener::changedContents( const 
css::datatransfer::clipboard::ClipboardEvent& rEventObject )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to