Example #1
0
 /* goodG2B() - use goodsource and badsink */
 private static void GoodG2B()
 {
     int data = CWE789_Uncontrolled_Mem_Alloc__Listen_tcp_HashSet_61b.GoodG2BSource();
     /* POTENTIAL FLAW: Create a HashSet using data as the initial size.  data may be very large, creating memory issues */
     HashSet <int> intHashSet = new HashSet <int>(data);
 }
Example #2
0
 public override void Bad()
 {
     int data = CWE789_Uncontrolled_Mem_Alloc__Listen_tcp_HashSet_61b.BadSource();
     /* POTENTIAL FLAW: Create a HashSet using data as the initial size.  data may be very large, creating memory issues */
     HashSet <int> intHashSet = new HashSet <int>(data);
 }