Exemple #1
0
        /* goodG2B() - use goodsource and badsink */
        private static void GoodG2B()
        {
            uint data;

            /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
            data = 2;
            CWE191_Integer_Underflow__UInt32_min_sub_71b.GoodG2BSink((Object)data);
        }
Exemple #2
0
        /* goodB2G() - use badsource and goodsink */
        private static void GoodB2G()
        {
            uint data;

            /* POTENTIAL FLAW: Use the minimum size of the data type */
            data = uint.MinValue;
            CWE191_Integer_Underflow__UInt32_min_sub_71b.GoodB2GSink((Object)data);
        }
Exemple #3
0
        public override void Bad()
        {
            uint data;

            /* POTENTIAL FLAW: Use the minimum size of the data type */
            data = uint.MinValue;
            CWE191_Integer_Underflow__UInt32_min_sub_71b.BadSink((Object)data);
        }