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 855855 <from sourceSinkType =" Field"
856856 AccessPath=" [java.math.BigDecimal: java.lang.Object value]"
857857 AccessPathTypes=" [java.lang.Object]" />
858- <to sourceSinkType =" Return"
859- AccessPath=" [java.math.BigDecimal: java.lang.Object value]"
860- AccessPathTypes=" [java.lang.Object]" />
858+ <to sourceSinkType =" Return" />
861859 </flow >
862860 </flows >
863861 </method >
Original file line number Diff line number Diff line change 470470 <flow isAlias =" false" typeChecking =" false" >
471471 <from sourceSinkType =" Field" AccessPath =" [java.math.BigInteger: java.lang.Object value]"
472472 AccessPathTypes=" [java.lang.Object]" />
473- <to sourceSinkType =" Return" AccessPath =" [java.math.BigInteger: java.lang.Object value]"
474- AccessPathTypes=" [java.lang.Object]" />
473+ <to sourceSinkType =" Return" />
475474 </flow >
476475 </flows >
477476 </method >
Original file line number Diff line number Diff line change 33import java .io .ByteArrayOutputStream ;
44import java .io .ObjectOutputStream ;
55import java .io .ObjectOutputStream .PutField ;
6+ import java .math .BigInteger ;
7+ import java .util .HashMap ;
8+ import java .util .Map ;
69
710public class ApiClassClient {
811 public Object source () {
@@ -284,4 +287,19 @@ public void taintedFieldToString() {
284287 char c = str .charAt (2 );
285288 sink (c );
286289 }
290+
291+ public void bigIntegerToString () {
292+ BigInteger i = new BigInteger (stringSource ());
293+ String str = i .toString ();
294+ char c = str .charAt (2 );
295+ sink (c );
296+ }
297+
298+ public void mapToString () {
299+ Map <String , String > map = new HashMap <>();
300+ map .put ("Secret" , stringSource ());
301+ String str = map .toString ();
302+ char c = str .charAt (2 );
303+ sink (c );
304+ }
287305}
Original file line number Diff line number Diff line change @@ -217,6 +217,16 @@ public void taintedFieldToString() {
217217 testFlowForMethod ("<soot.jimple.infoflow.test.methodSummary.ApiClassClient: void taintedFieldToString()>" );
218218 }
219219
220+ @ Test (timeout = 30000 )
221+ public void bigIntegerToString () {
222+ testFlowForMethod ("<soot.jimple.infoflow.test.methodSummary.ApiClassClient: void bigIntegerToString()>" );
223+ }
224+
225+ @ Test (timeout = 30000 )
226+ public void mapToString () {
227+ testFlowForMethod ("<soot.jimple.infoflow.test.methodSummary.ApiClassClient: void mapToString()>" );
228+ }
229+
220230 @ Test
221231 public void testAllSummaries () throws URISyntaxException , IOException {
222232 EagerSummaryProvider provider = new EagerSummaryProvider (TaintWrapperFactory .DEFAULT_SUMMARY_DIR );
You can’t perform that action at this time.
0 commit comments