File tree Expand file tree Collapse file tree
test/soot/jimple/infoflow/test/methodSummary Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 <methods >
44 <method id =" java.lang.String toString()" >
55 <flows >
6- <flow isAlias =" false" typeChecking =" false" >
6+ <flow isAlias =" false" typeChecking =" false" cutSubfields = " true " >
77 <from sourceSinkType =" Field" />
88 <to sourceSinkType =" Return" />
99 </flow >
Original file line number Diff line number Diff line change @@ -275,4 +275,13 @@ public void killTaint2() {
275275 sink (collection .get ());
276276 }
277277
278+ public void taintedFieldToString () {
279+ Data d = new Data ();
280+ d .objectField = source ();
281+ // in: d.objectField
282+ // expected out: str (not str.objectField!)
283+ String str = d .toString ();
284+ char c = str .charAt (2 );
285+ sink (c );
286+ }
278287}
Original file line number Diff line number Diff line change @@ -212,6 +212,11 @@ public void killTaint2() {
212212 testNoFlowForMethod ("<soot.jimple.infoflow.test.methodSummary.ApiClassClient: void killTaint2()>" );
213213 }
214214
215+ @ Test (timeout = 30000 )
216+ public void taintedFieldToString () {
217+ testFlowForMethod ("<soot.jimple.infoflow.test.methodSummary.ApiClassClient: void taintedFieldToString()>" );
218+ }
219+
215220 @ Test
216221 public void testAllSummaries () throws URISyntaxException , IOException {
217222 EagerSummaryProvider provider = new EagerSummaryProvider (TaintWrapperFactory .DEFAULT_SUMMARY_DIR );
You can’t perform that action at this time.
0 commit comments