/* goodB2G1() - use badsource and goodsink by setting the static variable to false instead of true */ private void GoodB2G1() { int data = 0; /* POTENTIAL FLAW: Set data to a value greater than the size of the array */ data = 100; goodB2G1PublicStatic = false; CWE129_Improper_Validation_of_Array_Index__large_fixed_array_write_no_check_22b.GoodB2G1Sink(data); }
public override void Bad() { int data = 0; /* POTENTIAL FLAW: Set data to a value greater than the size of the array */ data = 100; badPublicStatic = true; CWE129_Improper_Validation_of_Array_Index__large_fixed_array_write_no_check_22b.BadSink(data); }