File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
swift/ql/src/queries/Security/CWE-135 Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,16 @@ class StringLengthConflationConfiguration extends DataFlow::Configuration {
179
179
)
180
180
}
181
181
182
+ override predicate isSink ( DataFlow:: Node node , string flowstate ) {
183
+ // Permit any *incorrect* flowstate, as those are the results the query
184
+ // should report.
185
+ exists ( string correctFlowState |
186
+ isSinkImpl ( node , correctFlowState ) and
187
+ flowstate .( StringLengthConflationFlowState ) .getEquivClass ( ) !=
188
+ correctFlowState .( StringLengthConflationFlowState ) .getEquivClass ( )
189
+ )
190
+ }
191
+
182
192
override predicate isAdditionalFlowStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
183
193
// allow flow through `+`, `-`, `*` etc.
184
194
node2 .asExpr ( ) .( ArithmeticOperation ) .getAnOperand ( ) = node1 .asExpr ( )
You can’t perform that action at this time.
0 commit comments