/* goodB2G1() - use badsource and goodsink by setting the static variable to false instead of true */ private void GoodB2G1(HttpRequest req, HttpResponse resp) { int data = 0; data = int.MinValue; /* initialize data 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 { data = 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; CWE369_Divide_by_Zero__int_QueryString_Web_modulo_22b.GoodB2G1Sink(data, req, resp); }