cid#1474380 silence Untrusted loop bound
Change-Id: Ic162a5aeed4b422a8db5ff1bdd89c4e098ffa248
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113908
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 5991356..1a5ce063 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -1345,11 +1345,12 @@ void XclImpPolygonObj::ReadCoordList( XclImpStream& rStrm )
if( (rStrm.GetNextRecId() == EXC_ID_COORDLIST) && rStrm.StartNextRecord() )
{
OSL_ENSURE( rStrm.GetRecLeft() / 4 == mnPointCount, "XclImpPolygonObj::ReadCoordList - wrong polygon point count" );
while( rStrm.GetRecLeft() >= 4 )
while (true)
{
sal_uInt16 nX, nY;
nX = rStrm.ReaduInt16();
nY = rStrm.ReaduInt16();
if (rStrm.GetRecLeft() < 4)
break;
sal_uInt16 nX = rStrm.ReaduInt16();
sal_uInt16 nY = rStrm.ReaduInt16();
maCoords.emplace_back( nX, nY );
}
}