File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
swift/ql/test/library-tests/dataflow/taint/core Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -68,3 +68,21 @@ func taintThroughAssignmentArithmetic() {
68
68
e %= 100
69
69
sink ( arg: e) // $ tainted=66
70
70
}
71
+
72
+ func taintThroughBitwiseOperators( ) {
73
+ sink ( arg: 0 | source ( ) ) // $ MISSING: tainted=73
74
+ sink ( arg: source ( ) | 0 ) // $ MISSING: tainted=74
75
+
76
+ sink ( arg: 0xffff & source ( ) ) // $ MISSING: tainted=76
77
+ sink ( arg: source ( ) & 0xffff ) // $ MISSING: tainted=77
78
+
79
+ sink ( arg: 0xffff ^ source ( ) ) // $ MISSING: tainted=79
80
+ sink ( arg: source ( ) ^ 0xffff ) // $ MISSING: tainted=80
81
+
82
+ sink ( arg: source ( ) << 1 ) // $ MISSING: tainted=82
83
+ sink ( arg: source ( ) &<< 1 ) // $ MISSING: tainted=83
84
+ sink ( arg: source ( ) >> 1 ) // $ MISSING: tainted=84
85
+ sink ( arg: source ( ) &>> 1 ) // $ MISSING: tainted=85
86
+
87
+ sink ( arg: ~ source( ) ) // $ MISSING: tainted=87
88
+ }
You can’t perform that action at this time.
0 commit comments