[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Sep 21 20:06:25 UTC 2018
sw/source/filter/ww8/ww8atr.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 4f45687426af9b6d18b590816eb902bb364a521b
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Sep 21 09:00:35 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 21 22:05:58 2018 +0200
coverity#1439597 Dereference before null check
Change-Id: I0e4f8467440662a3d8cbda642339a55cfad445d8
Reviewed-on: https://gerrit.libreoffice.org/60849
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 8da786e78ccc..c331ab261f9d 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -5507,8 +5507,11 @@ const SwRedlineData* AttributeOutputBase::GetParagraphMarkerRedline( const SwTex
if ( pRedl->GetRedlineData().GetType() != aRedlineType )
continue;
- const SwPosition* pCheckedStt = pRedl->Start();
const SwPosition* pCheckedEnd = pRedl->End();
+ if (!pCheckedEnd)
+ continue;
+
+ const SwPosition* pCheckedStt = pRedl->Start();
sal_uLong uStartNodeIndex = pCheckedStt->nNode.GetIndex();
sal_uLong uStartCharIndex = pCheckedStt->nContent.GetIndex();
sal_uLong uEndNodeIndex = pCheckedEnd->nNode.GetIndex();
@@ -5517,9 +5520,6 @@ const SwRedlineData* AttributeOutputBase::GetParagraphMarkerRedline( const SwTex
if( uStartNodeIndex <= uNodeIndex && uNodeIndex < uEndNodeIndex )
{
- if ( !pCheckedEnd )
- continue;
-
// Maybe add here a check that also the start & end of the redline is the entire paragraph
if ( ( uStartNodeIndex < uEndNodeIndex ) &&
// check start:
More information about the Libreoffice-commits
mailing list