1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0031585: Access Violation while creating fillet - ChiFi3d_Builder::PerformIntersectionAtEnd

There is one case in PerformIntersectionAtEnd that did not test whether
an array access exceeded the length of the array, in rare cases
resulting in a segmentation fault. That error-handling behavior is
replaced by the exception code used elsewhere in the function. For
consistency, the code is copied exactly as implemented elsewhere. This
code has the same effect as that proposed by the bug submitter.
This commit is contained in:
Chris Hennes 2022-02-12 18:52:19 -06:00 committed by kgv
parent 60490a5c19
commit da9cb57f57

View File

@ -2036,6 +2036,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))