From: geay Date: Fri, 28 Mar 2014 09:58:07 +0000 (+0100) Subject: Protect MEDCouplingUMesh::IntersectMeshes against agressive users. X-Git-Tag: V7_4_0a1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=de98e8594cd884c815f1444832593125b9d88417;p=tools%2Fmedcoupling.git Protect MEDCouplingUMesh::IntersectMeshes against agressive users. --- diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx index 9721d1fc9..a1df7ca5c 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx @@ -1120,6 +1120,7 @@ std::list::iterator QuadraticPolygon::fillAsMuchAsPossibleWi if(!direction) it.previousLoop(); Node *nodeToTest; + int szMax(pol1Splitted.size()+1),ii(0);// here a protection against agressive users of IntersectMeshes of invalid input meshes std::list::iterator ret; do { @@ -1133,8 +1134,11 @@ std::list::iterator QuadraticPolygon::fillAsMuchAsPossibleWi ret=CheckInList(nodeToTest,iStart,iEnd); if(completed()) return iEnd; + ii++; } - while(ret==iEnd); + while(ret==iEnd && ii