/* goodG2B() - use goodsource and badsink */ private static void GoodG2B() { float data = CWE197_Numeric_Truncation_Error__float_database_to_byte_61b.GoodG2BSource(); { /* POTENTIAL FLAW: Convert data to a byte, possibly causing a truncation error */ IO.WriteLine((byte)data); } }
public override void Bad() { float data = CWE197_Numeric_Truncation_Error__float_database_to_byte_61b.BadSource(); { /* POTENTIAL FLAW: Convert data to a byte, possibly causing a truncation error */ IO.WriteLine((byte)data); } }