/* goodG2B() - use goodsource and badsink */ private void GoodG2B() { int?data; /* FIX: hardcode data to non-null */ data = Int32.Parse("5"); CWE476_NULL_Pointer_Dereference__Integer_54b.GoodG2BSink(data); }
/* goodB2G() - use badsource and goodsink */ private void GoodB2G() { int?data; /* POTENTIAL FLAW: data is null */ data = null; CWE476_NULL_Pointer_Dereference__Integer_54b.GoodB2GSink(data); }
public override void Bad() { int?data; /* POTENTIAL FLAW: data is null */ data = null; CWE476_NULL_Pointer_Dereference__Integer_54b.BadSink(data); }