Ejemplo n.º 1
0
        /* goodG2B() - use goodsource and badsink */
        private static void GoodG2B()
        {
            string data;

            /* FIX: hardcode data to non-null */
            data = "This is not null";
            CWE476_NULL_Pointer_Dereference__String_71b.GoodG2BSink((Object)data);
        }
Ejemplo n.º 2
0
        /* goodB2G() - use badsource and goodsink */
        private static void GoodB2G()
        {
            string data;

            /* POTENTIAL FLAW: data is null */
            data = null;
            CWE476_NULL_Pointer_Dereference__String_71b.GoodB2GSink((Object)data);
        }
Ejemplo n.º 3
0
        public override void Bad()
        {
            string data;

            /* POTENTIAL FLAW: data is null */
            data = null;
            CWE476_NULL_Pointer_Dereference__String_71b.BadSink((Object)data);
        }