Salome HOME
IPAL0054628: Medial Axis failure and NETGEN SIGSEGV V9_5_0a2
authoreap <eap@opencascade.com>
Thu, 2 Apr 2020 18:14:06 +0000 (21:14 +0300)
committereap <eap@opencascade.com>
Thu, 2 Apr 2020 18:14:06 +0000 (21:14 +0300)
Prevent SIGSEGV

src/NETGENPlugin/NETGENPlugin_Mesher.cxx

index d1b674f150d24b143f96f7d832c14fd830bfcb25..c87731e4da743dd82ff7059e3f3ab029f093500c 100644 (file)
@@ -2483,7 +2483,8 @@ int NETGENPlugin_Mesher::FillSMesh(const netgen::OCCGeometry&          occgeo,
   // Create and insert nodes into nodeVec
   // -------------------------------------
 
-  nodeVec.resize( nbNod + 1 );
+  if ( nbNod > nbInitNod )
+    nodeVec.resize( nbNod + 1 );
   for ( i = nbInitNod+1; i <= nbNod; ++i )
   {
     const netgen::MeshPoint& ngPoint = ngMesh.Point(i);