Skip to content

Commit

Permalink
C++: Ensure that 'argumentOf' don't map too multiple argument positions.
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasVP committed Jan 17, 2025
1 parent 9970f78 commit 4e9eb1f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,11 @@ private class PrimaryArgumentNode extends ArgumentNode, OperandNode {

private class SideEffectArgumentNode extends ArgumentNode, SideEffectOperandNode {
override predicate argumentOf(DataFlowCall dfCall, ArgumentPosition pos) {
exists(int indirectionIndex |
exists(int indirectionIndex, ArgumentOperand arg |
pos = TIndirectionPosition(argumentIndex, pragma[only_bind_into](indirectionIndex)) and
this.getCallInstruction() = dfCall.asCallInstruction() and
super.hasAddressOperandAndIndirectionIndex(_, pragma[only_bind_into](indirectionIndex))
arg = call.getArgumentOperand(argumentIndex) and
super.hasAddressOperandAndIndirectionIndex(arg, pragma[only_bind_into](indirectionIndex))
)
}
}
Expand Down

0 comments on commit 4e9eb1f

Please sign in to comment.