Skip to content

Commit fb1a871

Browse files
authored
Merge pull request github#12855 from MathiasVP/fix-joins-in-use-after-free
C++: Fix bad self-join in `cpp/use-after-free`
2 parents 09502c6 + 61aba46 commit fb1a871

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/ql/src/Critical/UseAfterFree.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ module ParameterSinks {
128128
callHasTargetAndArgument(f, i, call, argument) and
129129
initializeParameterInFunction(f, i, p) and
130130
p = getAnAlwaysDereferencedParameter() and
131-
result = pragma[only_bind_out](valueNumber(argument).getAnInstruction()) and
131+
result =
132+
pragma[only_bind_out](pragma[only_bind_into](valueNumber(argument)).getAnInstruction()) and
132133
call = getAnAlwaysReachedCallInstruction(_)
133134
)
134135
}

0 commit comments

Comments
 (0)