diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-08-23 20:47:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-08-24 10:06:01 +0200 |
commit | 0f23433ae5c0e6d3e56027b883599ed3a2b49086 (patch) | |
tree | e16da5758524bcaa13976133067abb62ea250bb6 /sw | |
parent | 39a4c91b50cc2c934b8403beacc99f4d1f5fc7c3 (diff) |
ofz#25169 insertion into set might find a duplicate
in which case pImpRec is deleted and pImpRecTmp is invalid
Change-Id: I2a273a436ebd88cb53e329bbcb4f171dda6ed840
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101248
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 9e8429a06768..74eb087675c5 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1079,7 +1079,9 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, if( pImpRec->nShapeId ) { - auto pImpRecTmp = pImpRec.get(); + auto nShapeId = pImpRec->nShapeId; + auto nShapeOrder = (static_cast<sal_uLong>(pImpRec->aTextId.nTxBxS) << 16) + + pImpRec->aTextId.nSequence; // Complement Import Record List pImpRec->pObj = pObj; rImportData.insert(std::move(pImpRec)); @@ -1091,9 +1093,9 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, ( (rObjData.nSpFlags & ShapeFlag::Group) && (rObjData.nCalledByGroup < 2) ) ) - StoreShapeOrder( pImpRecTmp->nShapeId, - ( static_cast<sal_uLong>(pImpRecTmp->aTextId.nTxBxS) << 16 ) - + pImpRecTmp->aTextId.nSequence, pObj ); + { + StoreShapeOrder(nShapeId, nShapeOrder, pObj); + } } else pImpRec.reset(); |