File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
cpp/ql/src/semmle/code/cpp/models/implementations Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -7,17 +7,13 @@ import semmle.code.cpp.models.interfaces.DataFlow
77import semmle.code.cpp.models.interfaces.Taint
88
99/**
10- * Model for C++ constructors (including copy and move constructors) .
10+ * Model for C++ conversion constructors.
1111 */
12- class ConstructorModel extends Constructor , TaintFunction {
12+ class ConversionConstructorModel extends ConversionConstructor , TaintFunction {
1313 override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
14- // taint flow from any constructor argument to the returned object
15- exists ( int idx |
16- input .isParameter ( idx ) and
17- output .isReturnValue ( ) and
18- not this .( CopyConstructorModel ) .hasDataFlow ( input , output ) and // don't duplicate where we have data flow
19- not this .( MoveConstructorModel ) .hasDataFlow ( input , output ) // don't duplicate where we have data flow
20- )
14+ // taint flow from the first constructor argument to the returned object
15+ input .isParameter ( 0 ) and
16+ output .isReturnValue ( )
2117 }
2218}
2319
You can’t perform that action at this time.
0 commit comments