[PATCH 7/7] ChFi3d_Builder: PerformIntersectionAtEnd: Check max number of faces
authorblobfish <blobfish@gmx.com>
Mon, 8 Feb 2021 00:02:09 +0000 (00:02 +0000)
committerKurt Kremitzki <kkremitzki@debian.org>
Mon, 8 Feb 2021 00:02:09 +0000 (00:02 +0000)
Gbp-Pq: Name 0007-ChFi3d_Builder-PerformIntersectionAtEnd-Check-max-nu.patch

src/ChFi3d/ChFi3d_Builder_C1.cxx

index 85fce5cff60dda3ca59195c7faeff23926188b9a..09a2e10307b23ad986a50e767a13f7e742e12e33 100644 (file)
@@ -2018,6 +2018,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
       if ((possible1 && possible2) || (!possible1 && !possible2) || (nbarete > 4)) {
        while (!trouve) {
          nb++;
+    if (nb>=nn) throw Standard_Failure("IntersectionAtEnd : the max number of faces reached");
          if (nb!=1) F3=Face[nb-2];
          Face[nb-1]=F3;
          if (CV1.Arc().IsSame(edgelibre1))