]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
regression on "imps/A3" test
authoreap <eap@opencascade.com>
Wed, 12 May 2010 12:11:46 +0000 (12:11 +0000)
committereap <eap@opencascade.com>
Wed, 12 May 2010 12:11:46 +0000 (12:11 +0000)
  * avoid SIGSEGV in case of invalid input mesh

src/StdMeshers/StdMeshers_Quadrangle_2D.cxx

index 5e2031c23bb0f37baca3f2bb72ce04404dd342d4..1c0cf5e5bd3f13384896bee228a44ef93443ea93 100644 (file)
@@ -1483,6 +1483,9 @@ bool StdMeshers_Quadrangle_2D::ComputeQuadPref (SMESH_Mesh &        aMesh,
   const vector<UVPtStruct>& uv_et = quad->side[2]->GetUVPtStruct(true,1 );
   const vector<UVPtStruct>& uv_el = quad->side[3]->GetUVPtStruct(false,0);
 
+  if ( uv_eb.size() != nb || uv_er.size() != nr || uv_et.size() != nt || uv_el.size() != nl )
+    return error( COMPERR_BAD_INPUT_MESH );
+
   // arrays for normalized params
   //cout<<"Dump B:"<<endl;
   TColStd_SequenceOfReal npb, npr, npt, npl;