/* goodG2B() - use goodsource and badsink */ private static void GoodG2B() { StreamReader data = CWE675_Duplicate_Operations_on_Resource__OpenText_61b.GoodG2BSource(); /* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */ data.Close(); }
public override void Bad() { StreamReader data = CWE675_Duplicate_Operations_on_Resource__OpenText_61b.BadSource(); /* POTENTIAL FLAW: Close the file in the sink (it may have been closed in the Source) */ data.Close(); }
/* goodB2G() - use badsource and goodsink */ private static void GoodB2G() { StreamReader data = CWE675_Duplicate_Operations_on_Resource__OpenText_61b.GoodB2GSource(); /* Do nothing */ /* FIX: Don't close the file in the sink */ ; /* empty statement needed for some flow variants */ }