File tree Expand file tree Collapse file tree
swift/ql/src/queries/Security/CWE-135 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -179,6 +179,16 @@ class StringLengthConflationConfiguration extends DataFlow::Configuration {
179179 )
180180 }
181181
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+
182192 override predicate isAdditionalFlowStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
183193 // allow flow through `+`, `-`, `*` etc.
184194 node2 .asExpr ( ) .( ArithmeticOperation ) .getAnOperand ( ) = node1 .asExpr ( )
You can’t perform that action at this time.
0 commit comments