/* goodG2B() - use goodsource and badsink */ private void GoodG2B() { string data; /* FIX: hardcode data to non-null */ data = "This is not null"; CWE476_NULL_Pointer_Dereference__String_51b.GoodG2BSink(data); }
/* goodB2G() - use badsource and goodsink */ private void GoodB2G() { string data; /* POTENTIAL FLAW: data is null */ data = null; CWE476_NULL_Pointer_Dereference__String_51b.GoodB2GSink(data); }
public override void Bad() { string data; /* POTENTIAL FLAW: data is null */ data = null; CWE476_NULL_Pointer_Dereference__String_51b.BadSink(data); }