/* goodB2G() - use badsource and goodsink */ private static void GoodB2G() { int count = CWE400_Uncontrolled_Resource_Consumption__Database_for_loop_61b.GoodB2GSource(); int i = 0; /* FIX: Validate count before using it as the for loop variant */ if (count > 0 && count <= 20) { for (i = 0; i < count; i++) { IO.WriteLine("Hello"); } } }