File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
cpp/ql/lib/semmle/code/cpp/models/implementations Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,12 @@ private class StdSetConstructor extends Constructor, TaintFunction {
2727
2828 override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
2929 // taint flow from any parameter of an iterator type to the qualifier
30- input .isParameterDeref ( this .getAnIteratorParameterIndex ( ) ) and
30+ (
31+ // AST dataflow doesn't have indirection for iterators.
32+ // Once we deprecate AST dataflow we can delete this first disjunct.
33+ input .isParameter ( this .getAnIteratorParameterIndex ( ) ) or
34+ input .isParameterDeref ( this .getAnIteratorParameterIndex ( ) )
35+ ) and
3136 (
3237 output .isReturnValue ( ) // TODO: this is only needed for AST data flow, which treats constructors as returning the new object
3338 or
@@ -45,7 +50,12 @@ private class StdSetInsert extends TaintFunction {
4550 override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
4651 // flow from last parameter to qualifier and return value
4752 // (where the return value is a pair, this should really flow just to the first part of it)
48- input .isParameterDeref ( this .getNumberOfParameters ( ) - 1 ) and
53+ (
54+ // AST dataflow doesn't have indirection for iterators.
55+ // Once we deprecate AST dataflow we can delete this first disjunct.
56+ input .isParameter ( this .getNumberOfParameters ( ) - 1 ) or
57+ input .isParameterDeref ( this .getNumberOfParameters ( ) - 1 )
58+ ) and
4959 (
5060 output .isQualifierObject ( ) or
5161 output .isReturnValue ( )
You can’t perform that action at this time.
0 commit comments