From a060129f7827c91b7413610d21228625f2e779c7 Mon Sep 17 00:00:00 2001 From: razmyslovich Date: Mon, 16 Jun 2014 16:18:23 +0200 Subject: [PATCH] 0025011: IntAna_QuaQuadGeo can crash with out-of-bounds exception Fix the crash in IntAna_QuadQuadGeo by checking the number of intersections --- src/IntAna/IntAna_QuadQuadGeo.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IntAna/IntAna_QuadQuadGeo.cxx b/src/IntAna/IntAna_QuadQuadGeo.cxx index 425b268b25..212306a001 100644 --- a/src/IntAna/IntAna_QuadQuadGeo.cxx +++ b/src/IntAna/IntAna_QuadQuadGeo.cxx @@ -1516,7 +1516,7 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo(const gp_Cylinder& Cyl, gp_Pln aPln2(aQA2, aD3Ax2); // aIntr.Perform(aPln1, aPln2, Tol, Tol); - if (!aIntr.IsDone()) { + if (!aIntr.IsDone() || 0 == aIntr.NbSolutions()) { iRet=-1; // just in case. it must not be so typeres=IntAna_NoGeometricSolution; return;