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

Stephan Bergmann sbergman at redhat.com
Fri Feb 13 05:20:16 PST 2015


 sw/source/core/docnode/nodes.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit cba3f9a144938317ff6c29144222a08ee6a169db
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Feb 13 14:18:53 2015 +0100

    Work around -fsanitize=vptr
    
    Change-Id: Id6e418fb6ae69c6e71e5e52e6e08c1411ea08b65

diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 97fd7e0..a97dfe0 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -2262,7 +2262,10 @@ void SwNodes::RemoveNode( sal_uLong nDelPos, sal_uLong nSz, bool bDel )
             BigPtrEntry* pTempEntry = &aTempEntries[nCnt];
             BigPtrArray::Replace( nPrevNdIdx+1, pTempEntry );
             if( nCnt )
-                pPrev = (*this)[ nPrevNdIdx  - 1 ];
+                pPrev = BigPtrArray::operator []( nPrevNdIdx  - 1 );
+                    // the accessed element can be a naked BigPtrEntry from
+                    // aTempEntries, so the downcast to SwNode* in
+                    // SwNodes::operator[] would be illegal (and unnecessary)
         }
         nDelPos = pDel->GetPos() + 1;
     }


More information about the Libreoffice-commits mailing list