From 24cde508294b537e9a7b8d298cfee4a13656e9ef Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 16 Jun 2021 17:11:55 +0200 Subject: [PATCH] [EDF23724] : protection against intersection on a single array that can be ambigous and so return an unexpected result --- src/MEDCoupling/MEDCouplingMemArray.txx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MEDCoupling/MEDCouplingMemArray.txx b/src/MEDCoupling/MEDCouplingMemArray.txx index 1d1030307..1e8fb79f6 100755 --- a/src/MEDCoupling/MEDCouplingMemArray.txx +++ b/src/MEDCoupling/MEDCouplingMemArray.txx @@ -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 r; for(typename std::vector::const_iterator it=a.begin();it!=a.end();it++) { -- 2.39.2