/* goodB2G() - use BadSource and GoodSink */ private static void GoodB2G() { short data; /* POTENTIAL FLAW: Use a random value */ data = (short)(new Random().Next(short.MinValue, short.MaxValue)); Dictionary <int, short> dataDictionary = new Dictionary <int, short>(); dataDictionary.Add(0, data); dataDictionary.Add(1, data); dataDictionary.Add(2, data); CWE191_Integer_Underflow__Short_rand_sub_74b.GoodB2GSink(dataDictionary); }