[Libreoffice-commits] core.git: sw/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Sun Apr 28 11:18:30 UTC 2019


 sw/source/core/doc/docbm.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 74bb4f6f4ccc6877de12d22d1d8badd955ed1144
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Apr 28 13:20:33 2019 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Apr 28 13:17:52 2019 +0200

    tdf#120703 PVS: Avoid dereferencing nullptr
    
    V595 The 'pEndIdx' pointer was utilized before it was verified against nullptr.
         Check lines: 1328, 1347.
    
    Change-Id: If9aff472e6ec7429ef2055b44dd11e62d4489ba4
    Reviewed-on: https://gerrit.libreoffice.org/71458
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 840462916484..ac20908aff32 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1458,7 +1458,7 @@ void DelBookmarks(
 {
     // illegal range ??
     if(rStt.GetIndex() > rEnd.GetIndex()
-        || (rStt == rEnd && (!pSttIdx || pSttIdx->GetIndex() >= pEndIdx->GetIndex())))
+        || (rStt == rEnd && (!pSttIdx || !pEndIdx || pSttIdx->GetIndex() >= pEndIdx->GetIndex())))
         return;
     SwDoc* const pDoc = rStt.GetNode().GetDoc();
 


More information about the Libreoffice-commits mailing list