/* goodB2G1() - use badsource and goodsink by setting the static variable to false instead of true */ private void GoodB2G1(HttpRequest req, HttpResponse resp) { int count = 0; count = int.MinValue; /* initialize count in case id is not in query string */ /* POTENTIAL FLAW: Parse id param out of the URL querystring (without using getParam) */ { if (req.QueryString["id"] != null) { try { count = int.Parse(req.QueryString["id"]); } catch (FormatException exceptNumberFormat) { IO.Logger.Log(NLog.LogLevel.Warn, exceptNumberFormat, "Number format exception reading id from query string"); } } } goodB2G1PublicStatic = false; CWE400_Uncontrolled_Resource_Consumption__QueryString_Web_for_loop_22b.GoodB2G1Sink(count, req, resp); }