Salome HOME
[EDF23724] : protection against intersection on a single array that can be ambigous...
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 16 Jun 2021 15:11:55 +0000 (17:11 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 16 Jun 2021 15:11:55 +0000 (17:11 +0200)
src/MEDCoupling/MEDCouplingMemArray.txx

index 1d1030307ae32345315e0f2d45366952ea9d1232..1e8fb79f6b1e27dd0ec0b73455075df0b658c993 100755 (executable)
@@ -7082,6 +7082,9 @@ struct NotInRange
           throw INTERP_KERNEL::Exception("DataArrayInt::BuildIntersection : only single component allowed !");
       }
     //
+    if(a.size()==1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::BuildIntersection : only single not null element in array ! For safety reasons exception is raised !");
+    //
     std::set<T> r;
     for(typename std::vector<const DataArrayType *>::const_iterator it=a.begin();it!=a.end();it++)
       {