File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
cpp/ql/src/semmle/code/cpp/models/implementations Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,16 @@ class StdPairConstructor extends Constructor, TaintFunction {
1111 StdPairConstructor ( ) { this .getDeclaringType ( ) .hasQualifiedName ( "std" , "pair" ) }
1212
1313 /**
14- * Gets the index of a parameter to this function that is a reference to the
15- * value type of the container .
14+ * Gets the index of a parameter to this function that is a reference to
15+ * either value type of the pair .
1616 */
1717 int getAValueTypeParameterIndex ( ) {
1818 getParameter ( result ) .getUnspecifiedType ( ) .( ReferenceType ) .getBaseType ( ) =
1919 getDeclaringType ( ) .getTemplateArgument ( _) .( Type ) .getUnspecifiedType ( ) // i.e. the `T1` or `T2` of this `std::pair<T1, T2>`
2020 }
2121
2222 override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
23- // taint flow from any parameter of the value type to the returned object
23+ // taint flow from any parameter of a value type to the qualifier
2424 input .isParameterDeref ( getAValueTypeParameterIndex ( ) ) and
2525 (
2626 output .isReturnValue ( ) // TODO: this is only needed for AST data flow, which treats constructors as returning the new object
You can’t perform that action at this time.
0 commit comments