Skip to content

Commit 0839c1a

Browse files
committed
C++: Allow self-flow through indirect parameters.
1 parent da54751 commit 0839c1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ predicate additionalLambdaFlowStep(Node nodeFrom, Node nodeTo, boolean preserves
848848
* One example would be to allow flow like `p.foo = p.bar;`, which is disallowed
849849
* by default as a heuristic.
850850
*/
851-
predicate allowParameterReturnInSelf(ParameterNode p) { none() }
851+
predicate allowParameterReturnInSelf(ParameterNode p) { p instanceof IndirectParameterNode }
852852

853853
private predicate fieldHasApproxName(Field f, string s) {
854854
s = f.getName().charAt(0) and

0 commit comments

Comments
 (0)