| commit | 74bb4f6f4ccc6877de12d22d1d8badd955ed1144 | [log] |
|---|---|---|
| author | Mike Kaganski <mike.kaganski@collabora.com> | Sun Apr 28 13:20:33 2019 +0300 |
| committer | Mike Kaganski <mike.kaganski@collabora.com> | Sun Apr 28 13:17:52 2019 +0200 |
| tree | 10a8338221086197d9e17084e886ac8e7c2901eb | |
| parent | 65261babf4fbcba08deb7bc8871b8dbcbafcc26f [diff] |
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@collabora.com>
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 8404629..ac20908 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx
@@ -1458,7 +1458,7 @@ { // 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();