[catboost] check if pools.Test has same size as evalResultPtrs; found by fuzzing
([arc::mergeid] 5d393f99-6f5e320e-d2f7f1b4-5)
@@ -767,6 +767,8 @@ void TrainModel(const NJson::TJsonValue& plainJsonParams,
TFullModel* modelPtr,
const TVector<TEvalResult*>& evalResultPtrs)
{
+ CB_ENSURE(pools.Test.size() == evalResultPtrs.size());
+
THolder<IModelTrainer> modelTrainerHolder;
NJson::TJsonValue trainOptions;
NJson::TJsonValue outputFilesOptionsJson;
