sc/source/ui/docshell/docsh4.cxx |    5 ++++-
 sw/source/core/edit/edredln.cxx  |    2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit eaa3f84301affbb29378982ec7c263483e7b8571
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue Apr 1 10:23:18 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Apr 1 13:00:48 2025 +0200

    cid#1645529 silence Use after free
    
    Change-Id: Ie8ac6573b7b4d72e0c91d019190ed89546c9605e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183577
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/core/edit/edredln.cxx b/sw/source/core/edit/edredln.cxx
index 33ea531aa238..e778a33b3e82 100644
--- a/sw/source/core/edit/edredln.cxx
+++ b/sw/source/core/edit/edredln.cxx
@@ -104,7 +104,7 @@ void SwEditShell::ReinstatePaM(const SwRangeRedline& 
rRedline, SwPaM& rPaM)
 
         // Get rid of table selection or multi-selection if there is one.
         KillPams();
-
+        assert(!GetTableCursor() && "coverity#1645529");
         SwShellCursor* pCursor = getShellCursor(/*bBlock=*/true);
         *pCursor->GetPoint() = *rPaM.End();
         SetMark();
commit 7d54aeb2eeade99e9bde5766a7e930ac3bca1bcf
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue Apr 1 10:18:22 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Apr 1 13:00:42 2025 +0200

    cid#1645557 Dereference null return value
    
    Change-Id: I546558560a0044419abe86406d1d466729e809c2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183576
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 79cd9433783f..f404aa0d7210 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1366,7 +1366,10 @@ void ScDocShell::Execute( SfxRequest& rReq )
         case SID_PROTECTPOS:
         case SID_PROTECTSIZE:
         {
-            ScDrawView* pScDrawView = 
GetBestViewShell()->GetViewData().GetScDrawView();
+            ScTabViewShell* pViewShell = GetBestViewShell();
+            if (!pViewShell)
+                return;
+            ScDrawView* pScDrawView = 
pViewShell->GetViewData().GetScDrawView();
             if (!pScDrawView)
                 return;
 

Reply via email to