diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-08-23 20:47:00 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-08-25 07:38:55 +0200 |
commit | a904e4035daa5c58201e9f6e06b0282a9a11d252 (patch) | |
tree | 4a073e2fa43a700392a68cecb52942f345eec3f1 /sw | |
parent | 69b0fe3a11990403730a51fda5475f46915c27d3 (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/+/101155
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
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 89b45849fe69..f29833775b4b 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1076,7 +1076,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)); @@ -1088,9 +1090,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(); |