You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MyClassmyVar = newMyClass();
myVar.myString = source();
MyClassmySecondVar = newMyClass(); // If this statement is removed, the leak in the next statement is reported correctlysink(myVar.myString); // NOT reported by FlowDroid
where public String source() and public void sink(String param) are defined as source and sink respectively in the FlowDroid config and the custom class MyClass looks like this:
classMyClass{
StringmyString;
}
As annotated, FlowDroid doesn't report the leak, as long as the second instantiation is present. This is probably linked to #767 as for example adding System.out.println(mySecondVar); between the instantiation of mySecondVar ans the sink call also leads to the leak being correctly reported.
I'm using one of the newest version of FlowDroid: Commit a137b4d and the issue seems to be rather new as well: FlowDroid 2.14.1 correctly detects the leak.
Please consider the following code:
where
public String source()
andpublic void sink(String param)
are defined as source and sink respectively in the FlowDroid config and the custom classMyClass
looks like this:As annotated, FlowDroid doesn't report the leak, as long as the second instantiation is present. This is probably linked to #767 as for example adding
System.out.println(mySecondVar);
between the instantiation ofmySecondVar
ans the sink call also leads to the leak being correctly reported.I'm using one of the newest version of FlowDroid: Commit a137b4d and the issue seems to be rather new as well: FlowDroid 2.14.1 correctly detects the leak.
SourcesAndSinks.xml
I call FlowDroid via the command line
The text was updated successfully, but these errors were encountered: