@@ -235,8 +235,8 @@ std::unique_ptr<taint_rulest> taint_rulest::load(
235
235
{
236
236
msg.error ()
237
237
<< " Rule in taint configuration file was a "
238
- << rule_json << " instead of an object, ignoring it ." << messaget::eom;
239
- continue ;
238
+ << rule_json << " instead of an object, aborting load ." << messaget::eom;
239
+ return nullptr ;
240
240
}
241
241
242
242
const std::string comment = rule_json[" comment" ].value ,
@@ -249,25 +249,25 @@ std::unique_ptr<taint_rulest> taint_rulest::load(
249
249
if (!method_name.empty ())
250
250
{
251
251
msg.error ()
252
- << " Rule in taint configuration file contains method name attribute and also sets constructor to true, ignoring it "
252
+ << " Rule in taint configuration file contains method name attribute and also sets constructor to true, aborting load. "
253
253
<< messaget::eom;
254
- continue ;
254
+ return nullptr ;
255
255
}
256
256
method_name = " <init>" ;
257
257
}
258
258
if (class_name.empty ())
259
259
{
260
260
msg.error ()
261
- << " Rule in taint configuration file does not contain class attribute, ignoring it "
261
+ << " Rule in taint configuration file does not contain class attribute, aborting load. "
262
262
<< messaget::eom;
263
- continue ;
263
+ return nullptr ;
264
264
}
265
265
if (method_name.empty ())
266
266
{
267
267
msg.error ()
268
- << " Rule in taint configuration file does not contain method attribute, ignoring it "
268
+ << " Rule in taint configuration file does not contain method attribute, aborting load. "
269
269
<< messaget::eom;
270
- continue ;
270
+ return nullptr ;
271
271
}
272
272
method_name = class_name + " ." + method_name;
273
273
auto fn_details = fn_details_map.equal_range (method_name);
@@ -276,9 +276,9 @@ std::unique_ptr<taint_rulest> taint_rulest::load(
276
276
msg.error ()
277
277
<< " Rule in taint configuration file refers to "
278
278
<< method_name
279
- << " : a method that we could not find in the goto program, ignoring it "
279
+ << " : a method that we could not find in the goto program, aborting load. "
280
280
<< messaget::eom;
281
- continue ;
281
+ return nullptr ;
282
282
}
283
283
284
284
// Load all the possible locations from JSON
@@ -349,8 +349,9 @@ std::unique_ptr<taint_rulest> taint_rulest::load(
349
349
}
350
350
else
351
351
msg.error ()
352
- << " Rule has neither result nor sinkTarget, ignoring it ."
352
+ << " Rule has neither result nor sinkTarget, aborting load ."
353
353
<< messaget::eom;
354
+ return nullptr ;
354
355
}
355
356
356
357
return rules->is_empty () ? nullptr : move (rules);
0 commit comments