@@ -78,20 +78,6 @@ private FunctionInput getIteratorArgumentInput(Operator op, int index) {
7878 )
7979}
8080
81- private FunctionOutput getIteratorArgumentOutput ( Operator op , int index ) {
82- exists ( Type t |
83- t =
84- op
85- .getACallToThisFunction ( )
86- .getArgument ( index )
87- .getExplicitlyConverted ( )
88- .getType ( )
89- .stripTopLevelSpecifiers ( )
90- |
91- result .isParameterDeref ( index ) // TODO: does this work with an rvalue reference?
92- )
93- }
94-
9581/**
9682 * A non-member prefix `operator*` function for an iterator type.
9783 */
@@ -108,7 +94,7 @@ class IteratorPointerDereferenceOperator extends Operator, TaintFunction, Iterat
10894 output .isReturnValue ( )
10995 or
11096 input .isReturnValueDeref ( ) and
111- output = getIteratorArgumentOutput ( this , 0 )
97+ output . isParameterDeref ( 0 )
11298 }
11399}
114100
@@ -310,7 +296,7 @@ class IteratorAssignmentMemberOperator extends MemberFunction, TaintFunction {
310296 }
311297
312298 override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
313- input .isParameter ( 0 ) and
299+ input .isParameterDeref ( 0 ) and
314300 output .isQualifierObject ( )
315301 }
316302}
@@ -344,8 +330,7 @@ class BeginOrEndFunction extends MemberFunction, TaintFunction, GetIteratorFunct
344330 */
345331class InserterIteratorFunction extends GetIteratorFunction {
346332 InserterIteratorFunction ( ) {
347- this .hasName ( [ "front_inserter" , "inserter" , "back_inserter" ] ) and
348- this .getNamespace ( ) .hasName ( "std" )
333+ this .hasQualifiedName ( "std" , [ "front_inserter" , "inserter" , "back_inserter" ] )
349334 }
350335
351336 override predicate getsIterator ( FunctionInput input , FunctionOutput output ) {
0 commit comments