File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
swift/ql/test/library-tests/dataflow/taint/libraries Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -43,29 +43,29 @@ class UIScene {
4343
4444// --- tests ---
4545
46- func source( ) -> Any { return " " }
46+ func source( _ label : String ) -> Any { return " " }
4747func sink( _: Any ) { }
4848
4949func testUIOpenURLContext( ) {
5050 let safe = UIOpenURLContext ( )
51- let tainted = source ( ) as! UIOpenURLContext
51+ let tainted = source ( " OpenURLContext " ) as! UIOpenURLContext
5252
5353 sink ( safe. url)
5454 sink ( safe. options)
55- sink ( tainted. url) // $ tainted=51
55+ sink ( tainted. url) // $ tainted=OpenURLContext
5656 sink ( tainted. options)
5757}
5858
5959func testConnectionOptions( ) {
6060 let safe = UIScene . ConnectionOptions ( )
61- let tainted = source ( ) as! UIScene . ConnectionOptions
61+ let tainted = source ( " ConnectionOptions " ) as! UIScene . ConnectionOptions
6262
6363 sink ( safe. userActivities)
64- sink ( tainted. userActivities) // $ tainted=61
64+ sink ( tainted. userActivities) // $ tainted=ConnectionOptions
6565 sink ( safe. shortcutItem)
6666 sink ( tainted. shortcutItem)
6767 sink ( safe. urlContexts)
68- sink ( tainted. urlContexts) // $ tainted=61
68+ sink ( tainted. urlContexts) // $ tainted=ConnectionOptions
6969 sink ( safe. handoffUserActivityType)
7070 sink ( tainted. handoffUserActivityType)
7171 sink ( safe. cloudKitShareMetadata)
You can’t perform that action at this time.
0 commit comments