Kaydet (Commit) e73799f8 authored tarafından Michael Stahl's avatar Michael Stahl

sw: fix ASAN detected error in RtfSdrExport::Commit()

EscherPropertyContainer may allocate a 1-byte buffer if there are no
vertices / segments. (happens in sw_filters_test)

 in EscherPropertyContainer::CreateCustomShapeProperties(MSO_SPT, com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) filter/source/msfilter/escherex.cxx:3853:25

Change-Id: I56dedbd57d38cd017183060e924cb1340ea58ebf
üst 893362bc
...@@ -259,7 +259,8 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const Rectangle& rRec ...@@ -259,7 +259,8 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const Rectangle& rRec
EscherPropSortStruct aSegments; EscherPropSortStruct aSegments;
if (rProps.GetOpt(ESCHER_Prop_pVertices, aVertices) && if (rProps.GetOpt(ESCHER_Prop_pVertices, aVertices) &&
rProps.GetOpt(ESCHER_Prop_pSegmentInfo, aSegments)) rProps.GetOpt(ESCHER_Prop_pSegmentInfo, aSegments) &&
aVertices.nPropSize >= 6 && aSegments.nPropSize >= 6)
{ {
const sal_uInt8* pVerticesIt = aVertices.pBuf + 6; const sal_uInt8* pVerticesIt = aVertices.pBuf + 6;
sal_Size nVerticesPos = 6; sal_Size nVerticesPos = 6;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment