Beispiel #1
0
 /* goodG2B() - use goodsource and badsink */
 private static void GoodG2B()
 {
     int data = CWE197_Numeric_Truncation_Error__int_ReadLine_to_short_61b.GoodG2BSource();
     {
         /* POTENTIAL FLAW: Convert data to a short, possibly causing a truncation error */
         IO.WriteLine((short)data);
     }
 }
Beispiel #2
0
 public override void Bad()
 {
     int data = CWE197_Numeric_Truncation_Error__int_ReadLine_to_short_61b.BadSource();
     {
         /* POTENTIAL FLAW: Convert data to a short, possibly causing a truncation error */
         IO.WriteLine((short)data);
     }
 }